Welcome Guest, Not a member yet? Register   Sign In
User registration confirmation
#1

[eluser]Fred Riley[/eluser]
On registration to a site, users these days expect to receive a confirmation email with a clickable link to complete the registration. I'm currently adapting the excellent form validation tutorial in the Form Helper reference and that'll do as a basic registration system, but it would be nice to add email confirmation and/or completion as a grace note. Could someone please point me towards relevant documentation/tutorials if such exist, or give me hints as to how to go about this in CI if they don't?

I have looked at the FAQ and searched the fora for 'email validation' and 'user registration' with zero results, although the search is pretty iffy for me in Firefox even with the adblocker off. If this is a FAQ then my apologies.

Cheers

Fred

PS: This is the tenth time I've submitted this post, the previous times just getting a blank form again. Those were in the Code & App Devt forum, so maybe I don't have rights to it, hence my trying in this more general forum. I used FF for the first 4 and IE for the last few (though I don't see why that should make a difference), but this problem also occurred in previous topics I've created. Is this a known 'issue'? Is there a hidden captcha somewhere I'm not seeing? Or am I just cursed?

If at first you don't succeed, keep on trying, yea even unto the twentieth time.
#2

[eluser]smilie[/eluser]
I do not know if CI provides this functionality out of the box, but basically only thing you need to do is once your user has registered, to create a hash in (user) database, send e-mail with link with same hash and once clicked upon check if hashes matches. If they do match, you set flag in database to 'verified' otherwise not Smile

Cheers,
Smilie
#3

[eluser]eoinmcg[/eluser]
if you don't feel like reinventing the wheel take a look at ion auth:
http://github.com/benedmunds/CodeIgniter-Ion-Auth

i believe it has just what you're looking for
#4

[eluser]Fred Riley[/eluser]
Thanks for both of your helpful replies.

@eoinmcg: IonAuth looks to be a really good 'holistic' authentication system and I'll almost certainly use that for future projects, as setting up bullet-proof authentication is pretty time-consuming so this would be a big time saver, plus I could be sure it's secure. Are there any tutorials around, do you know? If not, no big, I'll look at the example code.

IonAuth is a bit over the top for my current requirements, so I think smilie's suggestion will do for confirmation emails - it should be easy enough to implement, I think, and would be a good coding exercise.

Cheers

Fred

PS: the forum system's done it again - this is my fourth posting attempt Sad
#5

[eluser]pbreit[/eluser]
CodeIgniter does not include and type of user registration functionality. You would need to build this yourself or use a library. Ion Auth is relatively light weight. Even if you don't want to use it, you may be able to study the code to see how it performs the email confirmation.
#6

[eluser]Fred Riley[/eluser]
[quote author="pbreit" date="1283919827"]CodeIgniter does not include and type of user registration functionality. You would need to build this yourself or use a library. Ion Auth is relatively light weight, . Even if you don't want to use it, you may be able to study the code to see how it performs the email confirmation.[/quote]

I've now had a proper look at ion-auth and it is, as we'd say in England, the dog's bollocks :o) - the number of really useful functions is quite staggering, and I particularly like the way it's been bundled with SQL to set up the various tables. And as you say it is lightweight, so I'll be using it after all. Maybe it should be included in the downloadable CI package?

Thanks again for the replies and pointing me in the direction of this excellent library.

Cheers

Fred




Theme © iAndrew 2016 - Forum software by © MyBB