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
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Need ability to approve new user - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Miscellaneous (https://userspice.com/forums/forumdisplay.php?fid=28)
+--- Forum: Modifications and Hackery (https://userspice.com/forums/forumdisplay.php?fid=29)
+--- Thread: Need ability to approve new user (/showthread.php?tid=652)

Pages: 1 2


Need ability to approve new user - mudmin - 08-03-2017

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.


Need ability to approve new user - joelmalach - 08-03-2017

Great - thanks

Eventually got it working - you had missed of a closing bracket which threw me for a bit, but now it's working

Here's the line I used

<pre>
Code:
if(!checkMenu(3,$user->data()->id)){
</pre>


Thanks everyone for your help.
What a refreshing change from stackoverflow!


Need ability to approve new user - mudmin - 08-03-2017

Oops! Sorry about that. Yeah. I've been thrashed on there and the arduino forums a lot. I've found google groups a little more accommodating when I'm asking something completely random. Reddit can be good too.

We just ban people who have bad attitudes around here, but I can only think of 2 of those.


Need ability to approve new user - firestorm - 08-03-2017

@joelmalach your comment has been closed as it wasnt formatted properly lol


Need ability to approve new user - mudmin - 08-03-2017

It's also off-topic.

Because everything is off topic over there.


Need ability to approve new user - Brandin - 08-03-2017

Duplicate...everything is always a duplicate! And if it's not it's too "situtational" or whatever word they use...you had enough time to write your reply and mark my question whatever, you could have answered it already!!! lol


Need ability to approve new user - joelmalach - 08-04-2017

Absolutely. I think it's a power trip for them.

It's like, "I know the answer but I'm not telling you because you haven't formatted the question exactly the way I want you to".

It's laughable now, but when you're stuck with a problem, it's so frustrating.