diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-26 16:09:51 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-26 16:09:51 +0000 |
commit | ddddda47fb414095371b80f0873dee3986d0d308 (patch) | |
tree | b71ec4da186fc10801e47bbc38586216031b3b0c /phpBB/includes/functions_user.php | |
parent | 920fc0156db872c6200e85da79bf67eb2f416d02 (diff) | |
download | forums-ddddda47fb414095371b80f0873dee3986d0d308.tar forums-ddddda47fb414095371b80f0873dee3986d0d308.tar.gz forums-ddddda47fb414095371b80f0873dee3986d0d308.tar.bz2 forums-ddddda47fb414095371b80f0873dee3986d0d308.tar.xz forums-ddddda47fb414095371b80f0873dee3986d0d308.zip |
- fix some oddities (doubled spaces for example)
- changed the way make_forum_select() is returning the forum list - now including skipped forums but being disabled. This should make identifying the correct forum much more easier.
- Changed some permission namings based on suggestions by the community
- Tried to comply to the permission field ordering within the language files while displaying permission sets. Hopefully it's worth the additional processing time.
- Disable submit buttons after clicking for installation and conversions.
git-svn-id: file:///svn/phpbb/trunk@6930 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6ef3e01056..933124ce28 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1210,7 +1210,7 @@ function validate_username($username, $allowed_username = false) } $sql = 'SELECT word - FROM ' . WORDS_TABLE; + FROM ' . WORDS_TABLE; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -1293,15 +1293,19 @@ function validate_password($password) /** * Check to see if email address is banned or already present in the DB * -* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) +* @param string $email The email to check +* @param string $allowed_email An allowed email, default being $user->data['user_email'] +* +* @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_email($email) +function validate_email($email, $allowed_email = false) { global $config, $db, $user; $email = strtolower($email); + $allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email); - if (strtolower($user->data['user_email']) == $email) + if ($allowed_email == $email) { return false; } @@ -1468,13 +1472,14 @@ function avatar_upload($data, &$error) $destination = $config['avatar_path']; - if ($destination[sizeof($destination) - 1] == '/' || $destination[sizeof($destination) - 1] == '\\') + // Adjust destination path (no trailing slash) + if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\') { $destination = substr($destination, 0, -1); } $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination); - if ($destination && ($destination[0] == '/' || $destination[0] == '\\')) + if ($destination && ($destination[0] == '/' || $destination[0] == "\\")) { $destination = ''; } |