Advertisement
Guest User

Untitled

a guest
Dec 18th, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2. //Whatever you put here will happen after the username and password are verified and the user is "technically" logged in, but they have not yet been redirected to their starting page.  This gives you access to all the user's data through $user->data()
  3.  
  4. //Where do you want to redirect the user after login
  5. //note that this path is relative from the userc/scripts folder, hence the ../../
  6.  
  7. //Note that the numbers, 3,4,5 are the permission level of the logged in user. If a user has more than 1, whichever one you list first will take priority.
  8.  
  9. if (checkMenu(3,$user->data()->id)){ //sales?
  10. Redirect::to('http://mydomain.com/sales.php');
  11. }elseif (checkMenu(4,$user->data()->id)){ //quality
  12.   Redirect::to('http://mydomain.com/quality.php');
  13. }else{
  14.   Redirect::to('http://mydomain.com/');
  15. }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement