Use user from parser instead of global variable.
[philipp/winterrodeln/mediawiki_extensions/wrreport.git] / wrreport_body.php
index 04d32e155f46a454906dec9a6ddcde2a68f475c6..deb2b61350ec230d7dc092c9515d2b5eb1faa0ec 100644 (file)
@@ -652,7 +652,7 @@ class WrReport {
        /// The current page name is taken.
        public static function bahnberichtformularParserHook($input, $args, $parser) {
                // Username
-               global $wgUser;
+               $wgUser = $parser->getUser();
                $author_name = NULL;
                if ($wgUser->isLoggedIn()) {
                        $author_name = $wgUser->getRealName();