best way to moderate user

Started on the old forum in June 2010 · view the original in the archive · old links redirect here

10 replies · 639 views · started 16 years ago · 1 min read

4 participants
nclemale36 Lead · 537 posts #1

i have put this code in "user" action in tools so that staff cant piss aound with other staffs profiles but it still shows the links for everything after it has displayed You can not moderate $user.

what am i missing here . . even tried exit(); but then it wotn let me moderate any user at all .

 
if($uid=543)
{ 
  echo "<b><img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
  echo "<br/>You can not moderate $user<br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  
  }
CreativityKills Lead · 833 posts #2

Duh

// Correct
if($uid == 543)
// Wrong
if($uid = 543)

also by the way, noted u use phpthumb for icons, thats a waste of resources.

something else Fellow · 2,296 posts #4

uid is normally related to your own user id number rather than someone elses ..... so is $uid defined to anything? ..... maybe if($who==543) ? really depends on what value your setting to the variable $uid

nclemale36 Lead · 537 posts #5

so i presume i should use $who and if so then how do i make it so i cant moderate certain ppl. ie other staff

something else Fellow · 2,296 posts #6

if its lava i think its

if(ismod($who)){
echo "<b><img src=\"../phpThumb/phpThumb.php?src=../images/notok.gif\" alt=\"x\"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
  echo "<br/>You can not moderate $user<br/>";
  echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  
  }else{
//do mod stuff here
}
nclemale36 Lead · 537 posts #7

that works mate but how can i detool ppl without having to go into database lol . as i wont be able to moderate any staff at all .

something else Fellow · 2,296 posts #8

use: if(ismod($who)&&$uid!=1){

(change 1 to your user id number)

nclemale36 Lead · 537 posts #9

hi mate cheers for your help . havnt been able to get back on here with server probs .dont even know how i managed to post that reply lol .anyway. i havnt tried that yet but will the owner of that id number be able to moderate themselves. as the code before stops all moderation of staff meaning that mods / admin etc etc cant use the tools in there profile .

something else Fellow · 2,296 posts #10

so they can staf can edit themselfs if(ismod($who)&&$uid!=1&&$uid!=$who){

WhiteWarrior Principal · 1,419 posts #11

if the staff start to piss around with profiles then remove there tools.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close