Commit 6651e413 by Félicie

mail

parent 1b490a48
......@@ -52,6 +52,8 @@ list($useraccount, $userprofile, $userpoints, $userfields) = qa_db_select_with_p
);
$changehandle = qa_opt('allow_change_usernames') || (!$userpoints['qposts'] && !$userpoints['aposts'] && !$userpoints['cposts']);
// The cooperator can't change his/her mail
$changemail = ((!$userpoints['qposts'] && !$userpoints['aposts'] && !$userpoints['cposts']) || qa_opt('confirm_user_emails') && $useraccount['level'] > QA_USER_LEVEL_EXPERT);
$doconfirms = qa_opt('confirm_user_emails') && $useraccount['level'] < QA_USER_LEVEL_EXPERT;
$isconfirmed = ($useraccount['flags'] & QA_USER_FLAGS_EMAIL_CONFIRMED) ? true : false;
......@@ -279,7 +281,7 @@ $qa_content['form_profile'] = array(
'value' => qa_html(isset($inemail) ? $inemail : $useraccount['email']),
'error' => isset($errors['email']) ? qa_html($errors['email']) :
($pending_confirmation ? qa_insert_login_links(qa_lang_html('users/email_please_confirm')) : null),
'type' => $pending_confirmation ? 'email' : ($isblocked ? 'static' : 'email'),
'type' => ($changemail && !$isblocked) ? 'text' : 'static',
),
'messages' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment