Commit 58557cf3 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1847001: Change check_email_exist() to check_email_exists()"

parents 48c94cda 600102f3
......@@ -274,7 +274,7 @@ function adduser_validate(Pieform $form, $values) {
$form->set_error('email', get_string('invalidemailaddress', 'artefact.internal'));
}
if (check_email_exist($email)) {
if (check_email_exists($email)) {
$form->set_error('email', get_string('emailalreadytaken', 'auth.internal'));
}
}
......
......@@ -266,7 +266,7 @@ function profileform_validate(Pieform $form, $values) {
$form->set_error('email', get_string('invalidemailaddress', 'artefact.internal') . ': ' . hsc($email));
break;
}
else if (check_email_exist($email)) {
else if (check_email_exists($email)) {
$form->set_error('email', get_string('unvalidatedemailalreadytaken', 'artefact.internal'));
break;
}
......
......@@ -3019,7 +3019,7 @@ function auth_register_validate(Pieform $form, $values) {
$form->set_error('email', get_string('invalidemailaddress', 'artefact.internal'));
}
if (check_email_exist($values['email'])) {
if (check_email_exists($values['email'])) {
$form->set_error('email', get_string('emailalreadytaken', 'auth.internal'));
}
}
......
......@@ -916,7 +916,7 @@ function generate_email_processing_address($userid, $userto, $type='B') {
* Case insensitive checking for emails to existing db
* @return bool if the emails exists or not
*/
function check_email_exist($email, $ownerid = 0) {
function check_email_exists($email, $ownerid = 0) {
// get existing users 'usr','email'
$resultarray = get_column_sql("SELECT email FROM {usr} WHERE id != ?", array($ownerid));
$resultarray = array_merge($resultarray, get_column_sql("SELECT email FROM {artefact_internal_profile_email} WHERE owner != ?", array($ownerid)));
......
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