Jump to content

[SOLVED] User Creation in Private System


FlyingIsFun1217

Recommended Posts

Hey!

 

So, what I've got is a private system, but I need people to be able to register for it.

 

What I'd like to do is somehow let the Administrator set up an account with a username and email, but let the user set his own password, instead of having to give it to the administrator.

 

I can't really think of any solutions to this. Is there a way to verify an incoming visit from a certain  email address? And would that really be a secure way of dealing with it? Would it be just as secure for the server to create a random string for a url like http://www.website.com/signup.php?eid=23n2j3b23j, and send that to the user, and check to see that it's the url the person is going to?

 

Guess I'm just looking for some ideas for solutions.

 

Thanks!

FlyingIsFun1217

Link to comment
Share on other sites

What I would do in your situation is create 2 fields in the database both with an int type. Then when the Administrator puts in the username and email it puts a random number in the database using the rand() function, while it puts that random number in the database it also emails that in the link (http://mysite.com/create_password.php?random=randomnumber). Also, when it registers the user it puts a 0(telling whether they are registered or not) in the database under the other int value that you created. Now when the user clicks the link in the database it will allow them to enter a password (finding them by the random number and the 0 in the database). When they enter the password it then sets the 0 to a 1 saying that they are registered that way they cannot keep clicking the password link and the random number will not show up if you test for both the random and the registered value. Hopefully that makes sense. If you have any questions feel free to ask.

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.