User Handling

User Handling

Thursday 24 March 2005 3:39:25 am - 6 replies

Author Message

Lex 007

Thursday 24 March 2005 3:47:42 am

Hi,

The quick and dirty solution I found was to override the user registration template with the following :

{set 
    aValid = array('first_name','last_name','user_account','user_birthdate','user_tel','user_fax','user_company','user_address','user_zip','user_city','user_subtype')
}

<form enctype="multipart/form-data"  action={"/user/register/"|ezurl} method="post" name="Register">

<div class="maincontentheader">
<h1>{"Register user"|i18n("design/standard/user")}</h1>
</div>

{section show=$validation.processed}

{section name=UnvalidatedAttributes loop=$validation.attributes show=$validation.attributes}
<div class="warning">
<h2>{"Input did not validate"|i18n("design/standard/user")}</h2>
<ul>
    <li>{$UnvalidatedAttributes:item.name}: {$UnvalidatedAttributes:item.description}</li>
</ul>
</div>
{section-else}
<div class="feedback">
<h2>{"Input was stored successfully"|i18n("design/standard/user")}</h2>
</div>
{/section}

{/section}


{section name=ContentObjectAttribute loop=$content_attributes sequence=array(bglight,bgdark)}
    {section show=$aValid|contains($ContentObjectAttribute:item.contentclass_attribute.identifier)}
        <input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentObjectAttribute:item.id}" />
        <div class="block">
        <label>{$ContentObjectAttribute:item.contentclass_attribute.name}</label><div class="labelbreak"></div>
        {attribute_edit_gui attribute=$ContentObjectAttribute:item}
        </div>
    {/section}
{/section}

<div class="buttonblock">
<input class="button" type="submit" name="PublishButton" value="{'Register'|i18n('design/standard/user')}" />
<input class="button" type="submit" name="CancelButton" value="{'Discard'|i18n('design/standard/user')}" />
</div>

</form>

aValid is the array of the attributes you want to show on registration ;)

Lex

Fabricio Guerrero

Thursday 24 March 2005 4:13:49 am

ok.. but sorry i did not explain my self correctly... the registration part ive got it done... i just update the original user class and made it have about 10 fields. but now i would like the user fill out the rest of the fields once he logs on... my first idea was to create new classes with in the user class.. but 4 some reason they're just not showing up... if i create them as content classes they show. but i assume i must create user classes so ezPublish can associate an User and all the little classes(additional info) i want to store for them...

or is there a way to associate an registered user(user class) with data collected by content classes?

Fabricio
pd: thanks for ur help anyway... it's sort of useful.. i can just create one HUGE class and show info according to my needs... as u say it's a dirty way but i'm sure ezPublush must have a cleaner way.... i hope.. ;)

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Lex 007

Thursday 24 March 2005 4:30:15 am

Then you could create a workflow type (on the "before content read" trigger) that checks if the user has a value for the newly created fields. If not, then the user is redirected to the "edit account" page.

Lex 007

Thursday 24 March 2005 4:53:37 am

OK, I found the problem ! I debugged the $query and found out that I don't have sufficient permissions in my cronjob to fetch the right nodes.

Now how to I login in a php cronjob ?

Patrick ALLAERT

Tuesday 19 July 2005 3:49:03 am

Lex 007,

Did you receive an answer about your question:
"how to I login in a php cronjob ?" ?

Regards

Patrick ALLAERT
http://www.dixite.com/
http://users.pandora.be/patrick_allaert/

Patrick ALLAERT

Tuesday 19 July 2005 3:57:09 am

I love to reply to myself :)

// Loging in Admin user (ID: 14)
$admin =& eZUser::fetch( 14 );
$admin->loginCurrent();

Patrick ALLAERT
http://www.dixite.com/
http://users.pandora.be/patrick_allaert/

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.