diff options
author | 2007-04-01 16:42:10 +0000 | |
---|---|---|
committer | 2007-04-01 16:42:10 +0000 | |
commit | e93165a9e14526cb40ca0b67a53a736e6dd0d6a8 (patch) | |
tree | f8c62ec51f934dee93f5ba0b4d0c52a19632ee56 /phpBB/includes/ucp/ucp_resend.php | |
parent | ok, these should fix the unread tracking bugs (yeah, actually two of them). W... (diff) | |
download | phpbb-e93165a9e14526cb40ca0b67a53a736e6dd0d6a8.tar.gz phpbb-e93165a9e14526cb40ca0b67a53a736e6dd0d6a8.tar.bz2 phpbb-e93165a9e14526cb40ca0b67a53a736e6dd0d6a8.zip |
some beautifications as well as making sure manually deactivated accounts are properly handled
git-svn-id: file:///svn/phpbb/trunk@7258 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_resend.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_resend.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index 1eaa30ce1e..10a1b672bd 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -28,7 +28,7 @@ class ucp_resend if ($submit) { - $sql = 'SELECT user_id, group_id, username, user_email, user_type, user_lang, user_actkey + $sql = 'SELECT user_id, group_id, username, user_email, user_type, user_lang, user_actkey, user_inactive_reason FROM ' . USERS_TABLE . " WHERE user_email = '" . $db->sql_escape($email) . "' AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; @@ -41,11 +41,21 @@ class ucp_resend trigger_error('NO_EMAIL_USER'); } - if (!$user_row['user_actkey']) + if ($user_row['user_type'] == USER_IGNORE) + { + trigger_error('NO_USER'); + } + + if (!$user_row['user_actkey'] && $user_row['user_type'] != USER_INACTIVE) { trigger_error('ACCOUNT_ALREADY_ACTIVATED'); } + if (!$user_row['user_actkey'] || ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_MANUAL)) + { + trigger_error('ACCOUNT_DEACTIVATED'); + } + // Determine coppa status on group (REGISTERED(_COPPA)) $sql = 'SELECT group_name, group_type FROM ' . GROUPS_TABLE . ' |