Editer l'auteur d'un article : limiter la liste aux éditeurs et admins

This commit is contained in:
Prof Langues 2020-09-28 16:44:01 +02:00
parent cda2d93812
commit e222a7ded2

View File

@ -468,6 +468,10 @@ class blog extends common {
self::$users = helper::arrayCollumn($this->getData(['user']), 'firstname'); self::$users = helper::arrayCollumn($this->getData(['user']), 'firstname');
ksort(self::$users); ksort(self::$users);
foreach(self::$users as $userId => &$userFirstname) { foreach(self::$users as $userId => &$userFirstname) {
// Les membres ne sont pas éditeurs, les exclure de la liste
if ( $this->getData(['user', $userId, 'group']) < self::GROUP_MODERATOR) {
unset(self::$users[$userId]);
}
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')'; $userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')';
} }
unset($userFirstname); unset($userFirstname);