Ban Cookie Mod

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
lele710
Registered User
Posts: 66
Joined: Thu Oct 20, 2005 7:52 pm

Ban Cookie Mod

Post by lele710 »

Hi,
i use Ban cookie mod.
It's a nice mod but i want another function in it...

I want that a specific user cannot be banned...

How can i do this?


Thanks
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

You could open admin/admin_user_ban.php and find:

Code: Select all

		$user_list[] = $this_userdata['user_id'];
And replace it with:

Code: Select all

		if ( !in_array($this_userdata['user_id'], array(2)) )
		{
			$user_list[] = $this_userdata['user_id'];
		}
Where "array(2)" would include all unbannable user ids separated by comma ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
lele710
Registered User
Posts: 66
Joined: Thu Oct 20, 2005 7:52 pm

Post by lele710 »

eviL<3 wrote: You could open admin/admin_user_ban.php and find:

Code: Select all

		$user_list[] = $this_userdata['user_id'];
And replace it with:

Code: Select all

		if ( !in_array($this_userdata['user_id'], array(2)) )
		{
			$user_list[] = $this_userdata['user_id'];
		}
Where "array(2)" would include all unbannable user ids separated by comma ;)


Don't works...

I have used that code:

Code: Select all

if ( !in_array($this_userdata['user_id'], array(myusername)) )
      {
         $user_list[] = $this_userdata['user_id'];
      }
ru4r34l
Registered User
Posts: 14
Joined: Wed Jan 24, 2007 9:23 pm

Post by ru4r34l »

try this instead:

Code: Select all

if ( !in_array($this_userdata['user_id'], myusername, otherusername) ) 
{ 
     $user_list[] = $this_userdata['user_id']; 
}
:P

regards,

ru4r34l
lele710
Registered User
Posts: 66
Joined: Thu Oct 20, 2005 7:52 pm

Post by lele710 »

ru4r34l wrote: try this instead:

Code: Select all

if ( !in_array($this_userdata['user_id'], myusername, otherusername) ) 
{ 
     $user_list[] = $this_userdata['user_id']; 
}
:P

regards,

ru4r34l


I have checked this and i have delete my coockies but every time that i try to login there is the messagge :

"You are Banned"
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

No, it has to be a user id, not user name. For multiple user ids, it would be:

Code: Select all

      if ( !in_array($this_userdata['user_id'], array(2, 3, 4, 6)) )
      {
         $user_list[] = $this_userdata['user_id'];
      }
This would make the user ids 2, 3, 4 and 6 unbannable.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Post Reply

Return to “[2.0.x] MOD Requests”