Exemplo n.º 1
0
 /**
  * @param \anlutro\Core\Auth\UserManager $users
  */
 public function __construct(UserManager $users)
 {
     $this->debug = (bool) Config::get('app.debug');
     $this->users = $users;
     $this->beforeFilter(function () {
         if (!$this->users->activationsEnabled()) {
             throw new \RuntimeException('Activation/registration is not enabled');
         }
     }, ['only' => ['attemptRegistration', 'activate']]);
     $this->beforeFilter(function () {
         if (!$this->users->remindersEnabled()) {
             throw new \RuntimeException('Reminders are not enabled');
         }
     }, ['only' => ['sendReminder', 'attemptReset']]);
 }
Exemplo n.º 2
0
 /**
  * Check if password reminders are enabled.
  *
  * @return boolean
  */
 private function activationEnabled()
 {
     return $this->users->activationsEnabled();
 }
Exemplo n.º 3
0
 /**
  * Show the create new user form.
  *
  * @return \Illuminate\View\View
  */
 public function create()
 {
     return $this->view('c::user.form', ['pageTitle' => Lang::get('c::user.admin-newuser'), 'user' => $this->users->getNew(), 'userTypes' => $this->getUserTypes(), 'formAction' => $this->url('store'), 'backUrl' => $this->url('index'), 'activate' => $this->users->activationsEnabled()]);
 }