OutputPage.php: Reuse existing variable $user
authorFomafix <fomafix@googlemail.com>
Tue, 23 Aug 2016 07:12:35 +0000 (07:12 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Tue, 23 Aug 2016 07:12:35 +0000 (07:12 +0000)
Follows-up to 81c291f2

Change-Id: Id32daf74549c8af886a46119b30ff29ab2a6ac94

includes/OutputPage.php

index 852a4ed..c7499b1 100644 (file)
@@ -3096,7 +3096,7 @@ class OutputPage extends ContextSource {
 
                $user = $this->getUser();
 
-               if ( !$this->getUser()->isLoggedIn() ) {
+               if ( !$user->isLoggedIn() ) {
                        // Anons have predictable edit tokens
                        return false;
                }