Skip to content

Commit

Permalink
Merge pull request #16 from 'XTDV-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Oct 14, 2014
2 parents eceefa7 + 809d441 commit fdf0ffb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions qa-ldap-process.php
Expand Up @@ -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
Expand Down Expand Up @@ -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, '/');
Expand Down

0 comments on commit fdf0ffb

Please sign in to comment.