Manaus Posted September 30, 2013 Share Posted September 30, 2013 Hello, I need to access a page provinding a specific url parameter, such as ?project=14 Before accessing, the user should authenticate. Is this doable? If so, can you provide some hint? Thank you very much Link to comment Share on other sites More sharing options...
MatthewSchenker Posted September 30, 2013 Share Posted September 30, 2013 Greetings, Assuming you have your users logging in before they try to access the page in question, you could use something like this: <?php if ($user->isSuperuser() OR $user->hasRole("admin")) // If user has one of these roles, he/she sees the page. { if ($input->get->project == 14) // Test if the query string has this value. { ?> <div class="private"> Do Whatever You Need Here </div> <?php } } ?> Everything that can only be seen by authenticated users goes into the "private" div. Thanks, Matthew Link to comment Share on other sites More sharing options...
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