HodrenNaidoo wrote:
I wanna create a new user profile but I want the username to be generated using 
the first name and second name. Is there a way this can be done?

yes, it can be done, it may have a few tricky corners. the id field of the member object is what is used as the username, by default, and id fields are a bit special; they're roughly the ZODB equivalent of a relational database's primary key. you have to have an id, and once you set the id you shouldn't change it.

i'd probably do something like this:

- tweak the id widget's 'visible' settings so it no longer shows up on the edit forms (also make regfield=0 so it doesn't show up on join form).

- create an IObjectAdded event subscriber that generates the id value and sets it on the member object. probably want to check to make sure that the id is an auto-generated one, so you don't accidentally change the id should this event ever get fired when you don't expect it to.

keep in mind that if you allow users to edit their first and last names, there's a possibility that the id and the names may become out of sync.

-r


I was thinking of inserting an algorithm that runs once the register button has been clicked. Can this be done? Thanks in advance

--
Archive: 
http://www.openplans.org/projects/remember/lists/remember/archive/2008/05/1210080785780
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]  
Please contact [EMAIL PROTECTED] for questions.




--
Archive: 
http://www.openplans.org/projects/remember/lists/remember/archive/2008/05/1210632434007
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]  
Please contact [EMAIL PROTECTED] for questions.

Reply via email to