News:

Wondering if this will always be free?  See why free is better.

Main Menu

Hidding Admin...

Started by Atomsk, May 22, 2005, 02:06:20 PM

Previous topic - Next topic

Atomsk

Somebody knows, what files should MOD to give admin privilegies to de user with uID=3 ???

I trying to set an invisible admin... a common user, but with all privilegies without changing permissions in the SQL...

Randall

A stealth admin, huh?

Try the member specific permissions mod and give the member every permission possible.  Look for it in the Mod's board.

Thantos

Open their profile -> Account Related Settings -> [ show additional groups ] -> (Check Administrator) -> Change Profile

Atomsk

but, the member "3" will be visible for the "real" admins O.o i don't want that :p

i want to make it admin MODing the Sources scripts... or hide the username in the lists of admins...


Thantos

File: Admin.php
Find
       $request = db_query("
               SELECT ID_MEMBER, realName
               FROM
{$db_prefix}members
               WHERE ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups)"
, __FILE__, __LINE__);

Replace:

       $request
= db_query("
               SELECT ID_MEMBER, realName
               FROM
{$db_prefix}members
               WHERE (ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups))
                               AND ID_MEMBER != 3
"
, __FILE__, __LINE__);

Atomsk

#5
Quote from: MikeMill on May 22, 2005, 02:31:00 PM
File: Admin.php
Find
        $request = db_query("
                SELECT ID_MEMBER, realName
                FROM
{$db_prefix}members
                WHERE ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups)"
, __FILE__, __LINE__);

Replace:

        $request
= db_query("
                SELECT ID_MEMBER, realName
                FROM
{$db_prefix}members
                WHERE (ID_GROUP = 1 OR FIND_IN_SET(1, additionalGroups))
                                AND ID_MEMBER != 3
"
, __FILE__, __LINE__);


thnx...

the admin with id 3 is hide, but still visible only in ->

index.php?action=membergroups;sa=members;id=1

thnx... i still working to take out the username of the list of membergroups...

Atomsk

i still having troubles trying yo hide de ghost admin in :

index.php?action=membergroups
index.php?action=membergroups;sa=members;id=1

any ideas???


Randall

Sorry, I thought you wanted an admin that didn't look like an admin. You want a completely invisible user with admin powers that even other admin can't see?

Atomsk

Quote from: Randall on May 22, 2005, 05:49:12 PM
Sorry, I thought you wanted an admin that didn't look like an admin. You want a completely invisible user with admin powers that even other admin can't see?

exactly...



Randall

Sorry, I don't even know how to get 'null' to not be null, so I can't offer a lot of help.

:)

Atomsk

now i trying to unlist de member "3" of this list :

Quote$query = db_query("
      SELECT mg.ID_GROUP, mg.groupName, mg.minPosts, mg.onlineColor, mg.stars, COUNT(mem.ID_MEMBER) AS num_members
      FROM {$db_prefix}membergroups AS mg
         LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP)
      GROUP BY mg.ID_GROUP
      ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName", __FILE__, __LINE__);
   $context['groups'] = array(
      'regular' => array(),
      'post' => array()
   );

someone can help with that????

Thantos

Try putting in
WHERE mem.ID_MEMBER != 3

before the GROUP BY

Atomsk

Quote from: MikeMill on May 22, 2005, 08:48:39 PM
Try putting in
WHERE mem.ID_MEMBER != 3

before the GROUP BY

i already tried, but it doesnt works properly... that line makes dissapear many other groups in "index.php?action=membergroups"...

with that line appears :

QuoteNewbie  94 0 Modificar
Easy Dancer  8 10 Modificar
Hard Dancer  1 25 Modificar

and, without that line appears :

QuoteNewbie  95 0 Modificar
Easy Dancer  8 10 Modificar
Hard Dancer  1 25 Modificar
Crazy Dancer  0 100 Modificar
Double Dancer  0 200 Modificar
Half Double Dancer  0 500 Modificar
Nightmare Dancer  0 1000 Modificar
God Dancer  0 2000 Modificar
Spammer  0 5000 Modificar
Pumper Jubilado  0 10000 Modificar
Pumper sin Vida  0 25000 Modificar

Thantos

WHERE IF(mem.ID_MEMBER = 3 AND mg.ID_GROUP=1, 0, 1)

try that instead of the previous where statement

Atomsk

thnx...

that line works : WHERE IF(mem.ID_MEMBER = 3 AND mg.ID_GROUP=1, 0, 1)


Advertisement: