Forums / Developer / "Automatic" user registration

"Automatic" user registration

Author Message

Koos TDK

Monday 04 October 2004 4:04:46 am

Hi!

I searhced the forums, but didn't get anything that seem to be quite what I want.

<b>SCENARIO:</b> I have a site where anonymous users can create an instance of a class(this works 100% already). I don't want to force them to login first before creating the listing, since I personaly hate it when I have to register on a site before I can do anything :-). This all works 100%.

<b>REQUIREMENT:</b> But I want the anon user to be able to came back at a later stage and change the data he submitted.

<b>PROPOSED SOLUTION:</b> I am thinking of adding 1(one) additional data type to the class, one for "PASSWORD"(probably a XML text) . So, when the user enters all the data, I can use the e-mail adress(one of the existing data types in the class) and the password the user chose to identify him/her uniquely.

<b>QUESTION(finally :-)):</b> Is this possible? The user then never realises they "logged in" at all, but they can be uniquely identified when they want to come back and change their information. Is their any way in which I can then maybe used the e-mail and password to "automatically" register the user and also send him/her an e-mail with the chosen login credentials?

I guess it would be beneficial to tie this in with the existing user register functionality, so that the changepassword etc. functionality will still work fine.

Sorry for the essay, just tried to get my messages axross as clearly as possible.

Any help or suggestions would be greatly appreciated.

<b>:-)</b>

Frederik Holljen

Monday 04 October 2004 4:37:04 am

This sounds like a bit of a mess to me since you want to both create new users when they create this class of yours together with the ability to identify the creator of the object by adding fields to this class. I think you should stick to one of the methods.
Whichever method you go for you'll have to write some PHP code. If you want users to be generated automatically you'll have to detect in the content module that this is happening and generating the user on the fly. If you want to check user id by fields in the class you'll have to write the code that does the actual comparisment.
I don't really like the idea of mixing any of these solutions into the content module though.
Maybe you are better of with a really simple user creation form which you display within your class template?

Eirik Alfstad Johansen

Monday 04 October 2004 12:07:39 pm

Hi Koos,

We wanted to do something similar on the client site we were working on a month back meaning that we wanted users to be able to edit their objects without the hassle of registering first. However, due to time and budget constraints, we ended up with allowing anonymous publishing, sacrificing effectiveness for the sake of usability.

I have thought of several scenarios where such an extension would be useful, so let me know if you start working on it, and I'll be happy to help.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Koos TDK

Tuesday 05 October 2004 12:03:48 am

Hi Frederik and Eirik, thanks so much for your replies!

Frederik, I agree with you, it does sound a bit like a mess, but as Eirik indicates, some kind functionality which allows this might be usefull for a number of people.

I have though of another possible solution(actually more of a "cheat"):

Some background: Currently the user enters the data for the entry in Steps at the moment, since he/she must first pick a region, then a category(Steps 1 and 2) which I then use to identify where the new instance of the class is to be created in the node tree.

I am going to try and "sneak" a login page in there(under Step 3), so the user just sees it as another step in the process of adding his/her listing, without "having to log in". Step 4 will then be the actual data entry to create the new instance of the class. Thus a "logged in" user will be creating the instance, with all the benefits as standard with eZP.

This does not really solve the problem, but "hides" it, so the user doesn't feel he has to log into the site before he can do anything, but it now forms part of the process of adding his listing.

I now have to go and test it to see if I can "sneak" the login page into the procedure. I guess I will have to chop out some stuff(as not to confuse the user) and switch off e-mail response verification, since I can't then first ask the user to respond to an e-mail before continuing with step 4.

Can the sub be registered and confirmed "in the background" without further action from the user, after submitting the "stealth" :-) login form?(Note to self - test this!)

I would like to work on a more elegant solution, but due to some time constraints will have to put it on my "to do" list for now :-)

Thanks again for any inputs :-)