aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authordougk_ff7 <dougk_ff7@users.sourceforge.net>2001-08-13 20:54:01 +0000
committerdougk_ff7 <dougk_ff7@users.sourceforge.net>2001-08-13 20:54:01 +0000
commitb476b503c55092f42232808aa3a14db07f2c7090 (patch)
tree0365b10b6b32af6946069222294f13b4b13ed00a /phpBB
parent67197288340e71ff4e24c8882da488fd5728d92c (diff)
downloadforums-b476b503c55092f42232808aa3a14db07f2c7090.tar
forums-b476b503c55092f42232808aa3a14db07f2c7090.tar.gz
forums-b476b503c55092f42232808aa3a14db07f2c7090.tar.bz2
forums-b476b503c55092f42232808aa3a14db07f2c7090.tar.xz
forums-b476b503c55092f42232808aa3a14db07f2c7090.zip
Added user deleting, as well as a few minor changes.
git-svn-id: file:///svn/phpbb/trunk@857 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/admin/admin_users.php50
-rwxr-xr-xphpBB/language/lang_english.php3
-rw-r--r--phpBB/templates/PSO/admin/user_edit_body.tpl16
3 files changed, 50 insertions, 19 deletions
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index 82c629bead..17df57da05 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -153,11 +153,8 @@ if ( isset($HTTP_GET_VARS['submit']) ) {
"ALLOW_AVATAR" => $board_config['allow_avatar_upload'],
"AVATAR" => ($user_avatar != "") ? "<img src=\"" . $board_config['avatar_path'] . "/" . stripslashes($user_avatar) . "\" alt=\"\" />" : "",
"AVATAR_SIZE" => $board_config['avatar_filesize'],
- "LANGUAGE_SELECT" => language_select(stripslashes($user_lang), $phpbb_root_path . "language/"),
- "THEME_SELECT" => theme_select($user_theme),
"TIMEZONE_SELECT" => tz_select($user_timezone),
"DATE_FORMAT" => stripslashes($user_dateformat),
- "TEMPLATE_SELECT" => template_select(stripslashes($user_template), $phpbb_root_path . "templates"),
"HTML_STATUS" => $html_status,
"BBCODE_STATUS" => $bbcode_status,
"SMILIES_STATUS" => $smilies_status,
@@ -215,6 +212,9 @@ if ( isset($HTTP_GET_VARS['submit']) ) {
"L_HTML_IS" => $lang['HTML'] . " " . $lang['is'],
"L_BBCODE_IS" => $lang['BBCode'] . " " . $lang['is'],
"L_SMILIES_ARE" => $lang['Smilies'] . " " . $lang['are'],
+
+ "L_DELETE_USER" => $lang['User_delete'],
+ "L_DELETE_USER_EXPLAIN" => $lang['User_delete_explain'],
"S_ALLOW_AVATAR_UPLOAD" => $board_config['allow_avatar_upload'],
"S_ALLOW_AVATAR_LOCAL" => $board_config['allow_avatar_local'],
@@ -614,10 +614,45 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
if(!$error)
{
- $sql = "UPDATE " . USERS_TABLE . "
- SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify_pm = $notifypm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_active = '1', user_actkey = '$user_actkey'" . $avatar_sql . "
- WHERE user_id = $user_id";
- if($result = $db->sql_query($sql))
+ if( $HTTP_POST_VARS['deleteuser'] )
+ {
+ $sql = "UPDATE " . POSTS_TABLE . "
+ SET poster_id = '-1'
+ WHERE poster_id = $user_id";
+ if( $result = $db->sql_query($sql) )
+ {
+ $sql = "UPDATE " . TOPICS_TABLE . "
+ SET topic_poster = '-1'
+ WHERE topic_poster = $user_id";
+ if( $result = $db->sql_query($sql) )
+ {
+ $sql = "DELETE FROM " . USERS_TABLE . "
+ WHERE user_id = $user_id";
+ if( $result = $db->sql_query($sql) )
+ {
+ message_die(GENERL_MESSAGE, $lang['User_deleted']);
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Could not update users table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Could not update topics table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ message_die(GENERAL_ERROR, "Could not update posts table", "", __LINE__, __FILE__, $sql);
+ }
+ }
+ else
+ {
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify_pm = $notifypm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_active = '1', user_actkey = '$user_actkey'" . $avatar_sql . "
+ WHERE poster_id = $user_id";
+ if($result = $db->sql_query($sql))
{
message_die(GENERAL_MESSAGE, $lang['Profile_updated']);
}
@@ -625,6 +660,7 @@ else if($HTTP_POST_VARS[submit] && $HTTP_POST_VARS['user_id'])
{
message_die(GENERAL_ERROR, "Could not update users table", "", __LINE__, __FILE__, $sql);
}
+ }
}
else
{
diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php
index 6572772efb..567f6c150c 100755
--- a/phpBB/language/lang_english.php
+++ b/phpBB/language/lang_english.php
@@ -782,6 +782,9 @@ $lang['Emotion'] = "Emotion";
// User Management
$lang['User_admin'] = "Administration";
$lang['User_admin_explain'] = "Here you can change your user's information. Do not abuse this power.<br />Deleting users is not provided here, nor is changing admin status. <br />Use the banning and user permission pages respectively.";
+$lang['User_delete'] = "Delete this user";
+$lang['User_delete_explain'] = "Click here to delete this user. This cannot be undone.";
+$lang['User_deleted'] = "User was successfully ddeleted.";
//
// End
diff --git a/phpBB/templates/PSO/admin/user_edit_body.tpl b/phpBB/templates/PSO/admin/user_edit_body.tpl
index 8dadf4fe3d..54d1902669 100644
--- a/phpBB/templates/PSO/admin/user_edit_body.tpl
+++ b/phpBB/templates/PSO/admin/user_edit_body.tpl
@@ -98,18 +98,6 @@
<td class="row2"><input type="radio" name="allowsmilies" value="1" {ALWAYS_ALLOW_SMILIES_YES} /> <span class="gen">{L_YES}</span>&nbsp;&nbsp;<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} /> <span class="gen">{L_NO}</span></td>
</tr>
<tr>
- <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
- <td class="row2">{LANGUAGE_SELECT}</td>
- </tr>
- <tr>
- <td class="row1"><span class="gen">{L_BOARD_THEME}:</span></td>
- <td class="row2">{THEME_SELECT}</td>
- </tr>
- <tr>
- <td class="row1"><span class="gen">{L_BOARD_TEMPLATE}:</span></td>
- <td class="row2">{TEMPLATE_SELECT}</td>
- </tr>
- <tr>
<td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
<td class="row2">{TIMEZONE_SELECT}</td>
</tr>
@@ -153,6 +141,10 @@
<!-- END avatargallery -->
<!-- END avatarblock -->
<tr>
+ <td class="row1"><span class="gen">{L_DELETE_USER}?</span></td>
+ <td class="row2"><input type="checkbox" name="deleteuser">{L_DELETE_USER_EXPLAIN}</td>
+ </tr>
+ <tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input type="reset" value="{L_RESET}" /></td>
</tr>
</table></td>