diff --git a/qa-ldap-process.php b/qa-ldap-process.php index 94fbd3c..cdf680d 100644 --- a/qa-ldap-process.php +++ b/qa-ldap-process.php @@ -2,8 +2,8 @@ /* This script grabs the user/pass combo directly * from the Question2Answer login page. * It uses a service account to find - * the user in the ldap database. - * When found the user/pass combo is checked against the + * the user in the ldap database. + * When found the user/pass combo is checked against the * LDAP authentication source. Following * this check, it either creates a SESSION array or * a cookie that can be checked by the ldap-login @@ -62,7 +62,14 @@ function isEmpty($attr) { $lname = $name[1]; $email = $name[2]; $user = $name[3]; - + + // Do not login or create account if mail value is NULL + if ( '' == $email ){ + // FIXME somehow print a message + qa_redirect('login'); + exit(); + } + if($inremember == 'true') { setcookie("qa-login_lname", $lname, time() + $expire, '/'); setcookie("qa-login_fname", $fname, time() + $expire, '/');