101Bram Posted July 19, 2017 Posted July 19, 2017 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.
Sergio Posted July 19, 2017 Posted July 19, 2017 Instead of doing that, why won't you just add a simple password field to the album page? So, you won't need to worry about sessions and admin access.
Sergio Posted July 19, 2017 Posted July 19, 2017 Add a password field to the album template; On the page, create a password and save; Add the form to the template; 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 } 8
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now