MINOR Do a isset check before using the value.

This happens if someone accidentially access /Security/LoginForm directly.
This commit is contained in:
Stig Lindqvist 2011-10-27 22:38:11 +02:00
parent d88b39f292
commit 6db830605c
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ class MemberAuthenticator extends Authenticator {
* @see Security::setDefaultAdmin()
*/
public static function authenticate($RAW_data, Form $form = null) {
$SQL_user = Convert::raw2sql($RAW_data['Email']);
if(array_key_exists('Email', $RAW_data) && $RAW_data['Email']){
$SQL_user = Convert::raw2sql($RAW_data['Email']);
} else {
return false;
}
$isLockedOut = false;
$result = null;