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
Need ability to approve new user
#11
You're missing some ().

Note that there are two functions available to do this. If you only want to check for one particular permission level, you can do

Code:
if(checkMenu(3,$user->data()->id){

or if you want to do multiple permission levels, you can do
Code:
if(hasPerm([2,3,4], $user->data()->id)){

of course you can always do the opposite logic
Code:
if(!hasPerm...

Finally, just so you know, you always have access to your user table with $user->data() so you can echo out the user's first name by doing
Code:
echo $user->data()->fname;

The
Code:
fname
is the column name you want to echo in the users table.

Welcome to UserSpice. I'm Dan, by the way. I use the Dan account when I'm on my phone (it has less permissions) and this one on my real pc.
  Reply


Messages In This Thread
Need ability to approve new user - by joelmalach - 07-31-2017, 03:04 PM
Need ability to approve new user - by dan - 07-31-2017, 03:16 PM
Need ability to approve new user - by dan - 07-31-2017, 03:26 PM
Need ability to approve new user - by joelmalach - 07-31-2017, 04:02 PM
Need ability to approve new user - by joelmalach - 07-31-2017, 06:06 PM
Need ability to approve new user - by karsen - 07-31-2017, 06:36 PM
Need ability to approve new user - by joelmalach - 08-01-2017, 07:34 AM
Need ability to approve new user - by joelmalach - 08-02-2017, 08:47 AM
Need ability to approve new user - by firestorm - 08-02-2017, 07:28 PM
Need ability to approve new user - by joelmalach - 08-03-2017, 08:59 AM
Need ability to approve new user - by mudmin - 08-03-2017, 01:20 PM
Need ability to approve new user - by joelmalach - 08-03-2017, 02:56 PM
Need ability to approve new user - by mudmin - 08-03-2017, 02:58 PM
Need ability to approve new user - by firestorm - 08-03-2017, 05:42 PM
Need ability to approve new user - by mudmin - 08-03-2017, 05:48 PM
Need ability to approve new user - by Brandin - 08-03-2017, 11:08 PM
Need ability to approve new user - by joelmalach - 08-04-2017, 04:26 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)