From 809d441a126cdebe52b6b62e7c96fd1a7e7320e2 Mon Sep 17 00:00:00 2001 From: Truong Ta Date: Tue, 14 Oct 2014 14:57:27 +0700 Subject: [PATCH] Fix issue if mail is empty or not set --- qa-ldap-process.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qa-ldap-process.php b/qa-ldap-process.php index 94fbd3c..0227666 100644 --- a/qa-ldap-process.php +++ b/qa-ldap-process.php @@ -63,6 +63,13 @@ function isEmpty($attr) { $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, '/');