Author |
Message |
Palbin
Site Admin

Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Dec 29, 2008 7:14 am |
|
Well the only real question is what to do when a user is a moderator of a group. You can't simply delete him/her because then it makes the group editable in phpbb.
What do you think of adding a screen that displays any groups that the users is a moderator of and gives the Admin a choice to delete the group or set a new moderator? |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Dec 30, 2008 7:30 am |
|
Or, possibly use the current Admin (the one doing the deleting) to be the moderator. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Palbin

|
Posted:
Tue Dec 30, 2008 10:55 am |
|
I thought of that, but an Admin is not a User. The moderator has to be a user.
What do you think about just deleting a group if the user is the moderator?
Or do you think we should go through the trouble of adding another screen that asked for a user to replace the current moderator. I really didn't want to get into adding language files, but what does everyone think? |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Tue Dec 30, 2008 1:03 pm |
|
There is no way to know in advance what permissions etc have been given to a group or why the webmaster set that specific group so deleting a group completely could be a potential disaster.
Imagine a very active site where there are maybe 20 support staff allocated to a group 'Support', the Moderator of this 'Support' group says he can no longer participate and the admin deletes his account......... |
|
|
|
 |
Palbin

|
Posted:
Tue Dec 30, 2008 1:50 pm |
|
Well I am not sure what to do. I have everything done other than changing the user_id for the group moderator and I am not sure what to do about that. Ideas anyone? I wish I could do what Montego suggested but that doesn't work  |
|
|
|
 |
montego

|
Posted:
Wed Dec 31, 2008 7:15 am |
|
First of all, hopefully you all have compared the code to the pre-RNYA (pre 2.3.0) too... I do see that it does not handle the moderator either.
The only thing I can suggest is maybe taking the earliest created user_id (that is still active) that is an admin/moderator and assigning the forum to it. The reason I say this is that for most cases wouldn't this be the initial admin?
Look at it this way, even prior to RN 2.3, the YA module did not handle this case, basically leaving that forum hanging out to dry... The above would be a major improvement IMO.
Hopefully my reasoning is "sound", but I will admit that I am NO phpBB expert. |
|
|
|
 |
Palbin

|
Posted:
Wed Dec 31, 2008 9:42 am |
|
One thing we could be is search for a forum admin. This is defined by the user_level field (not sure on name) in the user table. We could set the moderator to the first admin that it comes across. Then maybe default to the earliest user.
The only thing I don't like is that there is no way of knowing if the first (active) user is really an admin/owner/whatever.
Since the RN installer does make the user it creates a forum admin it is very possible that there are no forum admins.
I think searching for a forum admin will cover most situations there is still the IF factor. |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Wed Dec 31, 2008 12:46 pm |
|
Making the current admin the moderator wouldn't work because there is no guarantee that the admin = a user ID, which is what is required for moderator.
Why not give an error preventing the removal of the user until the admin resolves the situation? |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Palbin

|
Posted:
Wed Dec 31, 2008 4:25 pm |
|
OK i will just add a warning on the confirmation screen (remove confirm button) telling the admin what groups they are a moderator of. |
|
|
|
 |
Palbin

|
Posted:
Thu Jan 01, 2009 6:00 pm |
|
kguske, here it is:
http://www.raven.phpnuke-guild.org/uploads/file/delete_user_fix_2.7z
I changed the group deletion around, fixed the $prefix problem, and added a message on the confirmation screen about being a group moderator.
The following two language definitions will need to be added to the 4 language files.
Code:
if(!defined('_IS_MODERATOR')) define('_IS_MODERATOR','is the moderator of the following groups.');
if(!defined('_NEED_NEW_MODERATOR')) define('_NEED_NEW_MODERATOR','A new moderator must be set before the user can be deleted.');
|
Also I found a notice while adding users to test this.
Notice: Undefined variable: user_points in /*****/modules/Your_Account/admin/adduserconf.php on line 68
Code:
$user_points = intval($user_points);
|
I think that is just left over code from previous versions. The forum form adduser.php uses $add_points. I did a seach and couldn't find an other reference to $user_points
So that line needs to be removed or commented out. |
|
|
|
 |
Palbin

|
Posted:
Fri Jan 02, 2009 5:53 pm |
|
kguske, I have access to mantis now and have add the files to the issue and also created a new issue for $user_points. |
|
|
|
 |
|