aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_users.php
diff options
context:
space:
mode:
authorCullen Walsh <ckwalsh@phpbb.com>2011-04-20 23:14:38 -0700
committerCullen Walsh <ckwalsh@cullenwalsh.com>2012-03-18 22:20:45 +0000
commit84099e5bc1f452e1a4643fd78658929875ab1eee (patch)
treef89caba7c98587128009218f37f50630d585e83b /phpBB/includes/acp/acp_users.php
parent611a1d647a3a63013df472b469bf1f3e6e7bd657 (diff)
downloadforums-84099e5bc1f452e1a4643fd78658929875ab1eee.tar
forums-84099e5bc1f452e1a4643fd78658929875ab1eee.tar.gz
forums-84099e5bc1f452e1a4643fd78658929875ab1eee.tar.bz2
forums-84099e5bc1f452e1a4643fd78658929875ab1eee.tar.xz
forums-84099e5bc1f452e1a4643fd78658929875ab1eee.zip
[feature/avatars] Support proper avatar deletion, stub ACP
Fixing avatar deletion in the UCP and ACP, and stubbing the ACP configuration page. I'll admit I kind of got caught carried away, so this really should be a couple separate commits. PHPBB3-10018
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r--phpBB/includes/acp/acp_users.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 390e421a51..5dc1829e8b 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -452,10 +452,10 @@ class acp_users
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
-
+
$sql_ary = array(
'user_avatar' => '',
- 'user_avatar_type' => 0,
+ 'user_avatar_type' => '',
'user_avatar_width' => 0,
'user_avatar_height' => 0,
);
@@ -466,9 +466,10 @@ class acp_users
$db->sql_query($sql);
// Delete old avatar if present
- if ($user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
+ $avatar_manager = new phpbb_avatar_manager($phpbb_root_path, $phpEx, $config, $cache->getDriver());
+ if ($driver = $avatar_manager->get_driver($user_row['user_avatar_type']))
{
- avatar_delete('user', $user_row);
+ $driver->delete($user_row);
}
add_log('admin', 'LOG_USER_DEL_AVATAR', $user_row['username']);