Fix CreditsAction when user has no real name set but real names enabled
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 28 Sep 2017 02:36:31 +0000 (02:36 +0000)
committerBrian Wolff <bawolff+wn@gmail.com>
Thu, 28 Sep 2017 02:36:31 +0000 (02:36 +0000)
Change-Id: Ief347739a1231fa8bd814694bdb5b4f44ba41a77

includes/actions/CreditsAction.php

index 7025477..ed58686 100644 (file)
@@ -198,6 +198,9 @@ class CreditsAction extends FormlessAction {
        protected function link( User $user ) {
                if ( $this->canShowRealUserName() && !$user->isAnon() ) {
                        $real = $user->getRealName();
+                       if ( $real === '' ) {
+                               $real = $user->getName();
+                       }
                } else {
                        $real = $user->getName();
                }