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
This commit is contained in:
Ingo Schommer 2008-12-11 22:21:17 +00:00 committed by Sam Minnee
parent 042a4f0fac
commit d10d8a5ba2

View File

@ -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'];
}