Jump to content

One account for all users


101Bram
 Share

Recommended Posts

Hey,

is it possible to use one account for all users? On a wedding users will get the same password which they can use to see wedding photo's. It's a very basic kind of protection, but it will be enough. I am only worried that 3 users can not be logged in on the same time with 1 account.

Link to comment
Share on other sites

  1. Add a password field to the album template;
  2. On the page, create a password and save;
  3. Add the form to the template;
  4. Add this code, or something similar:
    if($input->post->album_password) {
    	//save on session variable so if the user reloads the page, he/she can still be logged in
      $session->album_password = $input->post->album_password;
    }
    if($session->album_password == $page->password) {
      //show content here
    } elseif($input->post->album_password && $session->album_password != $page->password) {
      $error = "Incorrect password";
    //echo error
    }

     

  • Like 8
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...