From f589ce3a842fb88a6b38fde7b1080a991e044706 Mon Sep 17 00:00:00 2001 From: David M Date: Fri, 17 Nov 2006 21:51:16 +0000 Subject: #5376 - removed some unneeded globals git-svn-id: file:///svn/phpbb/trunk@6597 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 15daa0c999..c30219c118 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2264,6 +2264,7 @@ function group_update_listings($group_id) { if (!function_exists('cache_moderators')) { + global $phpbb_root_path, $phpEx; include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); } cache_moderators(); -- cgit v1.2.1 From 6a082426840164a3c8187559dddf3ab777b958fa Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 19 Nov 2006 21:00:48 +0000 Subject: some tiny fixes. git-svn-id: file:///svn/phpbb/trunk@6614 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index c30219c118..584c0a9de4 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1115,8 +1115,7 @@ function validate_match($string, $optional = false, $match) * Also checks if it includes the " character, which we don't allow in usernames. * Used for registering, changing names, and posting anonymously with a username * -* @todo do we really check and disallow the " character in usernames as written above. Has it only be forgotten to include the check? -* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) +* @return mixed Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) */ function validate_username($username) { -- cgit v1.2.1 From ab9ec8064acb25d09d6d0edb93ecbe3b59541010 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 21 Nov 2006 18:15:53 +0000 Subject: - fixing a bunch of bugs - moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled. i hope not having introduced too many new bugs. git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 584c0a9de4..0664ab45ec 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -142,7 +142,7 @@ function user_add($user_row, $cp_data = false) 'username' => $user_row['username'], 'username_clean' => utf8_clean_string($user_row['username']), 'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '', - 'user_email' => $user_row['user_email'], + 'user_email' => strtolower($user_row['user_email']), 'user_email_hash' => (int) crc32(strtolower($user_row['user_email'])) . strlen($user_row['user_email']), 'group_id' => $user_row['group_id'], 'user_type' => $user_row['user_type'], @@ -1217,7 +1217,9 @@ function validate_email($email) { global $config, $db, $user; - if (strtolower($user->data['user_email']) == strtolower($email)) + $email = strtolower($email); + + if (strtolower($user->data['user_email']) == $email) { return false; } @@ -1248,7 +1250,7 @@ function validate_email($email) { $sql = 'SELECT user_email_hash FROM ' . USERS_TABLE . " - WHERE user_email_hash = " . crc32(strtolower($email)) . strlen($email); + WHERE user_email_hash = " . crc32($email) . strlen($email); $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); -- cgit v1.2.1 From d529f78adb85698c9382ad29e4583f309eaf850a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 24 Nov 2006 14:59:26 +0000 Subject: rather large update, most important things done: - implemented provided patch/diff file for bug #5350 (Highway of Life) with some tiny changes and alterations - more username/colour changes/fixes - added a note about PM rule-dependant message removals so the user is not wondering too much if he can't remember his rules. :) - some column changes to fix unicode issues - bugfixes git-svn-id: file:///svn/phpbb/trunk@6650 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 0664ab45ec..514cd26d48 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -408,7 +408,7 @@ function user_delete($mode, $user_id, $post_username = false) AND folder_id = ' . PRIVMSGS_NO_BOX; $db->sql_query($sql); - // Delete all to-informations + // Delete all to-information $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . ' WHERE user_id = ' . $user_id; $db->sql_query($sql); @@ -1529,10 +1529,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow 'group_receive_pm' => 'int', 'group_legend' => 'int', 'group_message_limit' => 'int', + + 'group_founder_manage' => 'int', ); // Those are group-only attributes - $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit'); + $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_founder_manage'); // Check data if (!utf8_strlen($name) || utf8_strlen($name) > 40) @@ -1719,7 +1721,7 @@ function group_delete($group_id, $group_name = false) /** * Add user(s) to group * -* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' +* @return mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' */ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false) { -- cgit v1.2.1 From 870a3a1d8acc5f3b1632db3210ef499c0a01a4eb Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sat, 25 Nov 2006 20:00:56 +0000 Subject: message git-svn-id: file:///svn/phpbb/trunk@6655 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 514cd26d48..19c2b21655 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -142,6 +142,7 @@ function user_add($user_row, $cp_data = false) 'username' => $user_row['username'], 'username_clean' => utf8_clean_string($user_row['username']), 'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '', + 'user_pass_convert' => 0, 'user_email' => strtolower($user_row['user_email']), 'user_email_hash' => (int) crc32(strtolower($user_row['user_email'])) . strlen($user_row['user_email']), 'group_id' => $user_row['group_id'], -- cgit v1.2.1 From 6583f90b8d082096ebd9cfc0588730dd36efb077 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 14:55:18 +0000 Subject: - bug fixes for #5618, #5588 and #5584 - remove messenger->reset() calls (they are already performed on sending) git-svn-id: file:///svn/phpbb/trunk@6660 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 19c2b21655..971a544d11 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2018,7 +2018,6 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $messenger->save_queue(); -- cgit v1.2.1 From 12fb5f6aa2286eb3e1be384ba61c66131088d4a1 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 26 Nov 2006 17:22:32 +0000 Subject: - fixed bug within the user_add function - fixed some updater bugs git-svn-id: file:///svn/phpbb/trunk@6663 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/functions_user.php') diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 971a544d11..d22add63ea 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -171,6 +171,7 @@ function user_add($user_row, $cp_data = false) 'user_posts' => 0, 'user_dst' => 0, 'user_colour' => '', + 'user_occ' => '', 'user_interests' => '', 'user_avatar' => '', 'user_avatar_type' => 0, -- cgit v1.2.1