This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » User management plugins » sfGuard User Registration
sfGuard User Registration [message #60337] Sat, 06 September 2008 10:38 Go to next message
danwwilson  is currently offline danwwilson
Messages: 7
Registered: August 2008
Location: Melbourne
Junior Member
Hi all,

I am an absolute newbie when it comes to Symfony and sfGuard. I have read numerous tutorials and documents on sfGuard, however I haven't been able to find a simple to do or guidance on a particular topic.

I have installed sfGuard (and it is working fine) I also have a module called 'customer'. This is linked to the sf_guard_user table via a column called user_id (as seen in several tutorials).

What I am having trouble with is I would like to be able to create a user on the frontend of my web app. The user would enter a combination of sfGuard details (ie username, password) and a range of details as per my customer table. Once the form (or two) are submitted and registered in the DB I would like that user to be signed in (automatically).

Can anyone give me an idea of how I might be able to do this?

Thanks in advance.

Dan
Re: sfGuard User Registration [message #60797 is a reply to message #60337 ] Thu, 11 September 2008 19:12 Go to previous message
benhaines  is currently offline benhaines
Messages: 62
Registered: August 2006
Location: London
Member
Hi Dan,

Its simle really but agree that its not clear from the plugin docs.

The way I solved it is by simply creating a form to collect the appropriate data. Then use the data to create a new sfGuardUser() object. Simple...

Sadly I don't have any experience loggin the user in automatically, but I suspect thats a simple case of keeping the username and password stored using flash or session and then forwarding the browser to the login action.

I wouldn't recommend automatically logging in your users though. You'll have all sorts of problems with spam bots and it just isn't sensible from a security point of view.

Regards, Ben
Previous Topic:[SOLVED] Where is the "remember me" checkbox of the sfGuard plugin?
Next Topic:[SOLVED] How do I print the Username
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software