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
/printthread.php 16 require_once



UserSpice
advance redirect based on group permission - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: advance redirect based on group permission (/showthread.php?tid=415)



advance redirect based on group permission - meetmec12 - 01-03-2017

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


advance redirect based on group permission - mudmin - 01-03-2017

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