The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
advance redirect based on group permission
#1
How do I redirect based on group permission after login . eg user to account.php, administrator to superuser.php and moderator to adminmod.php . I knw I need few if statement but I think its better to do it the US way. Thanks
  Reply
#2
Go into usersc/scripts/custom_login_script.php

You will make a series of if statements and the first one will take presedence over the last one. So, for example, if a user is a member of 2 groups, whichever one you list first will be the redirect.

Every user group has an id number. You can see it if you go to admin permissions in the admin panel. By default, "user" is 1, admin is 2.

Your custom login script should look like this.
https://hastebin.com/usilulahoh.xml


  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)