Jump to content

[SOLVED] Activation email or send there password by email?


Flames

Recommended Posts

i've had both done to me numerous times, and i think i prefer to receive an e-mail with a link, as long as the activation page logs me in automatically (maybe add a couple of radio buttons saying "would you like to log in?" for those who don't) and redirects me to the main page onClick on a radio button (disabling javascript is for weaklings!  :P) and add a "continue" button for the weaklings.

Link to comment
Share on other sites

As far as I remember, I took the sha1 of the password + some random characters and put it in my URL that I sent in the validation mail. Then I just check if that code exists in my temporary member table and if it does, that row is moved to another table. If it doesn't, the code is obviously invalid. Just what I did.

Link to comment
Share on other sites

sounds like the way to do it. although i'm not sure you need sha1 if you salt the password string. md5 should be fine. actually, there'd be no real difference, only i dislike seeing long urls sitting in my e-mails. i know. i know. i'll go take my medication right away... :P.

 

and if you don't expect to have many users, you can probably put them all into the same table with an extra boolean column called "active". just make sure to run a clean-up every so often to delete un-activated users older than, say, 1 week.

Link to comment
Share on other sites

yeah i have a part in my table called status which is 0 or 1 cause i thought this was how i was gonna do it.

But i got another question to make logging in more secure, should i use a secondary table which holds info of the logged in user, so my pages can check if the user should be logged in or if they've some how hacked in?

Link to comment
Share on other sites

possibly... i dunno. on the 1 hand, it seems a little over-kill to me, but on the other, maybe you'll have content that really needs that extra protection. what kind of site is this gonna be?

 

i think i would consider doing this for a small handful of sensitive pages, but not for the whole site. consider that for this method of protection to be effective, you'd have to make an extra DB query + table look-up per user per page request. it doesn't amount to much if you don't have much traffic/users, but as the requests/user-base increase, so will the client waiting time. not that it won't happen anyway, but i believe this would get you to the point where you have to upgrade to a better host that much sooner.

 

this is just a guess, and not even a very educated one, so take it with a grain of salt (more like 3 lbs. of salt... :P).

Link to comment
Share on other sites

well, i don't think the protection required is going to be that necessary, as for my site, i dont know what im gonna do with it, i was thinking about maybe tutorials, or a game, but generally its for me. And seeing as its a free host that will probably rip the server apart.

But i don't think mine is secure at the moment, cookies a username and a password, any more tips on that?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.