diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2007-06-09 14:17:21 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2007-06-09 14:17:21 +0000 |
commit | 16f60f8838d8f89a14f01051fc5e792e3060ac10 (patch) | |
tree | bad0328f45e3955c7baf6bd7955181fdb4a33de9 /phpBB/includes/functions_user.php | |
parent | 1667a179238e77223d8ce83ab857d122a9a5c267 (diff) | |
download | forums-16f60f8838d8f89a14f01051fc5e792e3060ac10.tar forums-16f60f8838d8f89a14f01051fc5e792e3060ac10.tar.gz forums-16f60f8838d8f89a14f01051fc5e792e3060ac10.tar.bz2 forums-16f60f8838d8f89a14f01051fc5e792e3060ac10.tar.xz forums-16f60f8838d8f89a14f01051fc5e792e3060ac10.zip |
#12275, #12267
git-svn-id: file:///svn/phpbb/trunk@7740 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 9e83281f92..53fb65d0f0 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1761,7 +1761,7 @@ function validate_jabber($jid) /** * Remove avatar */ -function avatar_delete($mode, $row) +function avatar_delete($mode, $row, $clean_db = false) { global $phpbb_root_path, $config, $db, $user; @@ -1774,6 +1774,10 @@ function avatar_delete($mode, $row) } } + if ($clean_db) + { + avatar_remove_db($row[$mode . '_avatar']); + } $filename = get_avatar_filename($row[$mode . '_avatar']); if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename)) { @@ -2415,6 +2419,22 @@ function group_correct_avatar($group_id, $old_entry) } } + +/** +* Remove avatar also for users not having the group as default +*/ +function avatar_remove_db($avatar_name) +{ + global $config, $db; + + $sql = 'UPDATE ' . USERS_TABLE . " + SET user_avatar = '', + user_avatar_type = 0 + WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\''; + $db->sql_query($sql); +} + + /** * Group Delete */ |