diff --git a/security/MemberLoginForm.php b/security/MemberLoginForm.php index 9b0f24768..aa83d88e2 100644 --- a/security/MemberLoginForm.php +++ b/security/MemberLoginForm.php @@ -78,14 +78,16 @@ class MemberLoginForm extends Form { if($backURL = $_REQUEST['BackURL']) { Session::clear("BackURL"); + Session::clear('SessionForms.MemberLoginForm.Email'); Director::redirect($backURL); - }else + } else Director::redirectBack(); - }else{ + } else { + Session::set('SessionForms.MemberLoginForm.Email', $data['Email']); if($badLoginURL = Session::get("BadLoginURL")){ Director::redirect($badLoginURL); - }else{ + } else { Director::redirectBack(); } }