vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   The wonderful remove feature - Where is the feature to remove that??? (https://vborg.vbsupport.ru/showthread.php?t=40394)

Chris M 06-28-2002 09:38 AM

The wonderful remove feature - Where is the feature to remove that???
 
Ok...

Some of you may know that we have had some bad times over the last few weeks...

I would like to know how I can :

a.) make the remove feature not work for any admin unless they are userid 1 or 3
b.) male it so that it only shows for members unless they are userid 1 or 3...

i.e. Only myself and the owner can remove admins, but other admins can remove anyone except other admins...

This is because myself and the owner are not a security leak, but the other admins could be...

Can it be done?

Satan

Takara 06-28-2002 09:43 AM

Sure it is, go into /admin/user.php

Find
PHP Code:

// ###################### Start Remove #######################

if ($action=="remove") { 

Add below:
PHP Code:


if (($bbuserinfo[userid]!=AND $bbuserinfo[userid]!=3)) {
  echo 
"<p>You cannot edit profiles.</p>";
  
cpfooter();
  exit;


I dont really get your second request, but. That should do what you want.

[edit] I think its if (($bbuserinfo[userid]!=1 OR $bbuserinfo[userid]!=3)) ... it might be AND. I get mixed up with those things... And I changed my mind, I set it at and... eurgh *head hurts*

Actually, dont trust that. lol, firefly or someone else, can you tell me if its OR or AND? @_@;

Chris M 06-28-2002 10:04 AM

Yeh...

It is AND...

Thanks for the first bit:)

Now to get it so that Admins can remove members, mods, super mods etc, but not other Admins...

Satan

Takara 06-28-2002 10:24 AM

well, you can put something like OR $user[usergroupid]==<admin group> in there... I think

hehe ^_^

Xenon 06-28-2002 10:32 AM

yes, but AND, not or ;)

Takara 06-28-2002 10:43 AM

well, for the usergroup part, wouldnt you want to be doing

"If userid isnt 1 and userid isnt 3 or usergroupid is 1"

hmm, it might not be $user[usergroupid] that you want to use.. I dunno

/me <-- stupid

Xenon 06-28-2002 10:55 AM

yo have to find this lines:
PHP Code:

if ($HTTP_POST_VARS['action']=="kill") {

  
$user=$DB_site->query_first("SELECT username FROM user WHERE userid='$userid'"); 

replace them with this:
PHP Code:

if ($HTTP_POST_VARS['action']=="kill") {

  
$user=$DB_site->query_first("SELECT username,usergroupid FROM user WHERE userid='$userid'");
if (
$bbuserinfo[userid]!=AND $bbuserinfo[userid]!=AND $user[usergroupid]==6) {
  echo 
"<p>You cannot delete Admin users.</p>";
  
cpfooter();
  exit;



Chris M 06-28-2002 12:04 PM

Thanks:D

Satan

Xenon 06-28-2002 04:16 PM

np, hope you'll have more luck in the future than in past...

Chris M 06-28-2002 09:40 PM

Thanks...

So do I;)

Satan


All times are GMT. The time now is 10:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01065 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete