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
Call the role
#2
There is no function, your best bet is to do the following:
http://pasted.co/d92c20c9

Replace ***USER ID HERE*** with $user->data()->id or the user ID you defined in whatever variable.

You will simply echo $userPerm and it will echo it.

NOTE: If the user has more than 1 perm, it will echo the lowest ID (e.g. user before admin). You might want to add a "importance" value in your permissions table and add an Order By to the query.

If you want to make that a function, you can put it in custom functions with a name and your DB:get instance and define the variable.
  Reply


Messages In This Thread
Call the role - by shoropio - 09-03-2017, 03:54 AM
Call the role - by Brandin - 09-03-2017, 11:26 AM
Call the role - by shoropio - 09-03-2017, 02:16 PM
Call the role - by Brandin - 09-03-2017, 02:20 PM
Call the role - by Brandin - 09-03-2017, 02:21 PM
Call the role - by shoropio - 09-03-2017, 02:33 PM
Call the role - by karsen - 09-03-2017, 02:33 PM
Call the role - by mudmin - 09-03-2017, 02:34 PM
Call the role - by mudmin - 09-03-2017, 02:34 PM
Call the role - by shoropio - 09-03-2017, 02:42 PM
Call the role - by mudmin - 09-03-2017, 03:00 PM
Call the role - by Brandin - 09-03-2017, 03:28 PM
Call the role - by shoropio - 09-03-2017, 04:30 PM
Call the role - by dan - 09-03-2017, 07:03 PM
Call the role - by mudmin - 09-04-2017, 01:05 AM
Call the role - by shoropio - 09-04-2017, 02:45 AM
Call the role - by mudmin - 09-04-2017, 11:51 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)