app['repo.users']->find($usr_id)) { return []; } $sender = $user->getDisplayName(); $ret = [ 'text' => $this->app->trans('%user% demande votre approbation sur une ou plusieurs %before_link% collections %after_link%', ['%user%' => $sender, '%before_link%' => '', '%after_link%' => '']) , 'class' => '' ]; return $ret; } /** * * @return string */ public function get_name() { return $this->app->trans('Register approbation'); } /** * * @return string */ public function get_description() { return $this->app->trans('Recevoir des notifications lorsqu\'un utilisateur demande une inscription necessitant mon approbation'); } /** * @param integer $usr_id The id of the user to check * * @return boolean */ public function is_available(User $user) { if (!$this->app['registration.manager']->isRegistrationEnabled()) { return false; } return $this->app->getAclForUser($user)->has_right('manageusers'); } }