Forums / Developer / Registering a custom user

Registering a custom user

Author Message

Pål Øystein Carlsen

Thursday 13 November 2003 3:59:20 am

Well I have considered it, and I do not belive this is my problem. The reason is that I simply do not get anything out, not even the standard user criteria.

Besides there seems to be som kind of weird lag regarding updating the ini file. I have now gone back to the original setting, which I have used earlier, but I still can't see anything else than the two buttons. I have manualy cleared cache files and removed the override settings. Strange indeed.

Just to make sure I'll download the mysql manager and have a look, I haven't got it installed right now.

Pål Øystein Carlsen

Thursday 13 November 2003 6:20:33 am

Great news!
It works!!!

I have no idea why it works this time, but it does.
My site.ini.append looks like this:
[UserSettings]
RegistrationEmail=enabled
DefaultUserPlacement=53
UserClassID=17

I have not edited the standard register.tpl file , but just overriden it with a copy of its content.

What I find funny is that I have just small changes to the ezuser.tpl file. I override it to and the only changes I have done are the following:
<input type="hidden" name="ContentObjectAttribute_data_user_login_{$attribute.id}" value="{$attribute.content.user}" />
is replaced with:
<input type="hidden" name="ContentObjectAttribute_data_user_login_{$attribute.id}" value="{$attribute.content.bruker}" /> where "bruker is my name for the user datatype in the customised class.

This is done twice in the file overriding ezuser.tpl and I changed the similar ending of email to match my word for it in my custom class.

Weird, I was certain I was going to have to add similar input types for my other attributes like "occupation" "address" etc. But no, they just appeared. Why I do not really understand...

Anyway thanks for all your help, and if my explanation is somewhat confusing or incomplete please post so I can elaborate. Perhaps this thread can be usefull for other people(that way I can pretend my frustration has not been completely wasted)

Pål

Johan Grasmo

Wednesday 03 December 2003 6:28:21 am

Hi,

I've also got problems registering a custom user.
Let me give you an overview of what I'm trying to do.

I've put up a site with sitemap, news, guestbook etc. This part works perfectly.

The site will have three user types in addition to the administrator group: Freelancer, client and sponsor. Each of these types have their own registration-page, but will be using a common login-interface. The types will also access to user-specific pages, but that's not my main problem here.

I've scrounged the forums for examples of a site with different user type registrations, but I haven't found anything. So for now I'll settle to manage the registration of the "Freelancer" user.

I've created the Freelancer-user in the "User" class and it has been given the user rights. I've also overridden -user/register.tpl and -content/datatype/edit/ezuser.tpl and the override.ini.append has been updated to reflect this. I have checked that it really uses these templates. When I access the /user/register-page, I get the signup of the "default" user - not my Freelancer-user. I've changed the site.ini.append file to:

[UserSettings]
DefaultUserPlacement=144
UserClassID=18
UserClassGroupID=2

But still it shows the "default" registration page.

My questions are:
- Why don't I get the "Freelancer" registration page ?
- Is it possible to create three registration-pages, one page for each user-type ?
- Why isn't this better documented ?

When I look at how ez handles users and user-groups, I'm positive that ez supports what I'm doing but I don't know how to do it :-)

Thanks,

Johan