public function userCanExecute(User $user) { // JRS 02/24/14 only let staff users access this page $userGroups = $this->getContext()->getUser()->getGroups(); return in_array('staff', $userGroups) && $this->canChangePassword($user) === true && parent::userCanExecute($user); //return $this->canChangePassword( $user ) === true && parent::userCanExecute( $user ); }
public function userCanExecute(User $user) { $error = $this->canChangePassword($user); if (is_string($error)) { throw new ErrorPageError('internalerror', $error); } else { if (!$error) { throw new ErrorPageError('internalerror', 'resetpass_forbidden'); } } return parent::userCanExecute($user); }
public function userCanExecute(User $user) { return $this->canChangePassword($user) === true && parent::userCanExecute($user); }