mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Check if $member variable isn't empty before looking for first name in MemberLoginForm
MINOR Coding conventions, inconsistent use of tabs and spaces git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66318 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e50b7369b7
commit
55dbe2bf52
@ -115,16 +115,18 @@ class MemberLoginForm extends LoginForm {
|
|||||||
Director::redirect('Security/changepassword');
|
Director::redirect('Security/changepassword');
|
||||||
|
|
||||||
|
|
||||||
} else if(isset($_REQUEST['BackURL']) && $backURL = $_REQUEST['BackURL']) {
|
} elseif(isset($_REQUEST['BackURL']) && $backURL = $_REQUEST['BackURL']) {
|
||||||
Session::clear("BackURL");
|
Session::clear("BackURL");
|
||||||
Director::redirect($backURL);
|
Director::redirect($backURL);
|
||||||
} else {
|
} else {
|
||||||
$member = Member::currentUser();
|
$member = Member::currentUser();
|
||||||
$firstname = Convert::raw2xml($member->FirstName);
|
if($member) {
|
||||||
Session::set("Security.Message.message",
|
$firstname = Convert::raw2xml($member->FirstName);
|
||||||
sprintf(_t('Member.WELCOMEBACK', "Welcome Back, %s"), $firstname)
|
Session::set('Security.Message.message',
|
||||||
);
|
sprintf(_t('Member.WELCOMEBACK', "Welcome Back, %s"), $firstname)
|
||||||
Session::set("Security.Message.type", "good");
|
);
|
||||||
|
Session::set("Security.Message.type", "good");
|
||||||
|
}
|
||||||
Director::redirectBack();
|
Director::redirectBack();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user