protected function getUserAccountName(NotificationInterface $notification, $keyInData = 'uid')
    {
        $names = [];
        $count = 0;

        if (isset($notification[$keyInData])) {

            $uidList  = $notification[$keyInData];
            $count    = count($uidList);

            if (!is_array($uidList)) {
                $uidList = [$uidList];
            }

            $names = array_map('format_username', user_load_multiple($uidList));
        }

        if (empty($names)) {
            return;
        }

        if ($count) {
            return $this->getTitleString($names, $count);
        }
    }
protected function getUserAccountName(NotificationInterface $notification, $keyInData = 'uid')
    {
        $names = [];
        $count = 0;

        if (isset($notification[$keyInData])) {

            $uidList  = $notification[$keyInData];
            $count    = count($uidList);

            if (!is_array($uidList)) {
                $uidList = [$uidList];
            }

            $names = array_map('format_username', user_load_multiple($uidList));
        }

        if (empty($names)) {
            return;
        }

        if ($count) {
            return $this->getTitleString($names, $count);
        }
    }
protected function getUserAccountName ( NotificationInterface $ notification , $ keyInData = 'uid' ) { $ names = [ ] ; $ count = 0 ; if ( isset ( $ notification [ $ keyInData ] ) ) { $ uidList = $ notification [ $ keyInData ] ; $ count = count ( $ uidList ) ; if ( ! is_array ( $ uidList ) ) { $ uidList = [ $ uidList ] ; } $ names = array_map ( 'format_username' , user_load_multiple ( $ uidList ) ) ; } if ( empty ( $ names ) ) { return ; } if ( $ count ) { return $ this -> getTitleString ( $ names , $ count ) ; } }
Return user account name for given uid

@param NotificationInterface $notification
@param string $keyInData
Key in notification data in which to search for user names

@return string
Return user account name for given uid