1
ebridge2001
about delete webmaster

My XOOPS site have two webmaster.Now,I want to delete a webmaster, but when i delete a webmaster ,i get a blank page.the webmaster user still have.

why?

my site : http://www.chinamu.org

2
ebridge2001
Re: about delete webmaster

why? please help me/

3
phppp
Re: about delete webmaster
  • 2004/2/27 18:02

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Refer to this topic

If you want to make it work before the next XOOPS release, you have to modify the file:
modules/system/admin/groups/main.php

around line 227

4
phppp
Re: about delete webmaster
  • 2004/2/27 20:00

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Version: 2.06
Problem: Webmaster group user can not be removed
Temporary solution:

file: modules/system/admin/groups/main.php

Line 227 - 230

} else {
$member_handler->removeUsersFromGroup($groupid, $uids);
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED);
}

==>:

if(1!=$xoopsUser->uid()){ // Not the super webmaster? action denied!
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_ADMINNO);
}
$new_uids=array();
for($i=0;$i if(1!=$uids[$i]) $new_uids[]=$uids[$i]; // Not the super webmaster? removal is permitted
}
$uids=$new_uids;

}//else {
$member_handler->removeUsersFromGroup($groupid, $uids);
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED);
//}

5
ebridge2001
Re: about delete webmaster

ok thanks a lot!

6
longhair
Re: about delete webmaster
  • 2004/4/16 5:07

  • longhair

  • Friend of XOOPS

  • Posts: 70

  • Since: 2004/3/29



I implemented this fix, however when I attempt to remove a webmaster from the group, I receive the following error;

'There must be at least one user in the webmasters group'

I have 3 webmasters and am attempting to remove only 1.

Is this a known problem?

7
Dave_L
Re: about delete webmaster
  • 2004/4/16 5:25

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Is it user #1 that you're trying to remove?

8
longhair
Re: about delete webmaster
  • 2004/4/16 6:11

  • longhair

  • Friend of XOOPS

  • Posts: 70

  • Since: 2004/3/29



No, user 3, or for what it's worth, user ID 5 in the sql database.

9
Dave_L
Re: about delete webmaster
  • 2004/4/16 14:00

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


And you're logged in as user #1 when doing this?

10
Herko
Re: about delete webmaster
  • 2004/4/16 14:07

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


This problem has been fixed in the CVS, and will be part of the new release. This is the fix:

in /modules/system/admin/groups/main.php

lines 222 to 232
original code:
$memstart = isset($memstart) ? intval($memstart) : 0;
               if (
$groupid == XOOPS_GROUP_ADMIN) {
 !                 if (
$member_handler->getUserCountByGroup($groupid) <= count($uids)){
 !
                    
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_ADMINNO);
 !                 }
               } else {
                   
$member_handler->removeUsersFromGroup($groupid$uids);
 -
                
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED);
               }
           }
           break;

new code:
$memstart = isset($memstart) ? intval($memstart) : 0;
               if (
$groupid == XOOPS_GROUP_ADMIN) {
 !                 if (
$member_handler->getUserCountByGroup($groupid) > count($uids)){
 !                     
$member_handler->removeUsersFromGroup($groupid$uids);
 !                 }
               } else {
                   
$member_handler->removeUsersFromGroup($groupid$uids);
               }
 +
            
redirect_header('admin.php?fct=groups&op=modify&g_id='.$groupid.'&memstart='.$memstart,0,_AM_DBUPDATED);
           }
           break;


Herko

Login

Who's Online

344 user(s) are online (279 user(s) are browsing Support Forums)


Members: 0


Guests: 344


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits