From d10d8a5ba2558000f6433b94c7cfe8a1b3ed5b9d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 11 Dec 2008 22:21:17 +0000 Subject: [PATCH] MINOR formatting in Security.php git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68457 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Security.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/security/Security.php b/security/Security.php index d4e212c93..4e3ac16f9 100644 --- a/security/Security.php +++ b/security/Security.php @@ -174,20 +174,12 @@ class Security extends Controller { // Work out the right message to show if(Member::currentUserID()) { - // user_error( 'PermFailure with member', E_USER_ERROR ); - - $message = isset($messageSet['alreadyLoggedIn']) - ? $messageSet['alreadyLoggedIn'] - : $messageSet['default']; - - if($member = Member::currentUser()) - $member->logout(); - + $message = isset($messageSet['alreadyLoggedIn']) ? $messageSet['alreadyLoggedIn'] : $messageSet['default']; + if($member = Member::currentUser()) { + $member->logOut(); + } } else if(substr(Director::history(),0,15) == 'Security/logout') { - $message = $messageSet['logInAgain'] - ? $messageSet['logInAgain'] - : $messageSet['default']; - + $message = $messageSet['logInAgain'] ? $messageSet['logInAgain'] : $messageSet['default']; } else { $message = $messageSet['default']; }