The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
changing and adding a redirect path
#10
So if your permission levels in are in userspice, you can go into the admin panel and at the top click on permission levels. Each permission level has an id. 1 is regular user. 2 is admin. The others you just add on your own. So in that usersc/scripts/did_not_have_permission.php you can put...

if(hasPerm([1],$user->data->id()){
Redirect::to('here');
}

if(hasPerm([2],$user->data->id()){
Redirect::to('here');
}

You can also put them in as an array, so
if(hasPerm([3,4,5],$user->data->id()){
Redirect::to('here');
}

Finally, you can redirect them with a message
if(hasPerm([2],$user->data->id()){
Redirect::to('account.php?err=Sorry+you+do+not+have+permission!');
}
  Reply


Messages In This Thread
changing and adding a redirect path - by raven - 02-27-2017, 06:27 PM
changing and adding a redirect path - by mudmin - 02-27-2017, 07:05 PM
changing and adding a redirect path - by raven - 02-27-2017, 07:46 PM
changing and adding a redirect path - by mudmin - 02-27-2017, 10:50 PM
changing and adding a redirect path - by mudmin - 02-27-2017, 11:00 PM
changing and adding a redirect path - by raven - 02-28-2017, 01:56 AM
changing and adding a redirect path - by raven - 02-28-2017, 02:36 AM
changing and adding a redirect path - by dan - 02-28-2017, 03:57 AM
changing and adding a redirect path - by raven - 02-28-2017, 08:40 PM
changing and adding a redirect path - by mudmin - 02-28-2017, 09:19 PM
changing and adding a redirect path - by raven - 02-28-2017, 11:03 PM
changing and adding a redirect path - by raven - 02-28-2017, 11:20 PM
changing and adding a redirect path - by mudmin - 02-28-2017, 11:42 PM
changing and adding a redirect path - by raven - 03-01-2017, 01:39 AM
changing and adding a redirect path - by mudmin - 03-01-2017, 02:05 AM
changing and adding a redirect path - by raven - 03-01-2017, 02:28 AM
changing and adding a redirect path - by mudmin - 03-01-2017, 02:34 AM
changing and adding a redirect path - by raven - 03-01-2017, 03:00 AM
changing and adding a redirect path - by raven - 03-09-2017, 01:13 PM
changing and adding a redirect path - by mudmin - 03-09-2017, 09:50 PM
changing and adding a redirect path - by raven - 03-09-2017, 10:36 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)