-1

I am making a site's authentication system in which the sign up form isn't located at index and it isn't going to be at index. If a user is already signed in and wants to fill sign up form, the script tells him that you're already signed in with the following account. It is ok to do that or not? I've seen Google telling that re-enter your password and email is already filled and also picture and name are also displayed.

5

Why don't you have the site so that if a user is signed in, they don't see the sign-in section of the site?

Or if it's a menu, logged in users see a menu option called logout, all other users see a menu option called login/sign-up.

  • +1 you don't need to block access to the page, merely block access to the link to the page. – schroeder Jul 7 '14 at 14:40
  • I don't have a link to sign up form on the protected page. If user accesses signup.php manually. What should I do? – Muhammed Talha Akbar Jul 7 '14 at 15:20
  • Presumably you are tracking if the user is logged in using cookies or something similar? If so, the first line of the signup.php should be something like (and this is off the top of my head so may not be valid): if isset($_SESSION['loggedin']){ redirect to main page else "You need to login..." – TimC Jul 7 '14 at 15:24
  • I am tracking user through session. If session is set, then tell user he is already logged in with the account of following credentials. I have added a option to proceed to sign up form anyways. – Muhammed Talha Akbar Jul 7 '14 at 15:26
  • @TimC I have figured it out. Thanks for participating – Muhammed Talha Akbar Jul 7 '14 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.