Skip to content

Commit

Permalink
Do not skip e-mail validation if $g_login_method != LDAP
Browse files Browse the repository at this point in the history
Prior to this, function email_is_valid() always returned true when
$g_use_ldap_email = ON, even if $g_login_method != LDAP.

Even though this is not an usual case (when not using LDAP, the other
LDAP-related configuration options should be left to their default
values), this causes the actual validation to be skipped which could
lead to email sending errors.

Fixes #14632
  • Loading branch information
dregad committed Aug 17, 2012
1 parent a38858a commit 86abb9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/email_api.php
Expand Up @@ -113,7 +113,7 @@ function email_is_valid( $p_email ) {
return true;
}

if ( ON == config_get( 'use_ldap_email' ) ) {
if ( LDAP == config_get( 'login_method' ) && ON == config_get( 'use_ldap_email' ) ) {
return true;
}

Expand Down

0 comments on commit 86abb9c

Please sign in to comment.