示例#1
0
文件: Index.php 项目: pr-of-it/profit
 public function actionRegister($email = null, $password = null)
 {
     $identity = new Identity();
     $errors = new \T4\Html\Form\Exception();
     try {
         $email = $identity->validateEmail($email);
     } catch (\T4\Auth\Exception $e) {
     }
 }
示例#2
0
 public function actionRegister($register = null)
 {
     if (null !== $register) {
         try {
             $identity = new Identity();
             $user = $identity->register($register);
             $identity->login($user);
             $this->app->flash->message = 'Добро пожаловать, ' . $user->email . '!';
             $this->redirect('/');
         } catch (\App\Components\Auth\MultiException $e) {
             $this->data->errors = $e;
         }
         $this->data->email = $register->email;
     }
 }
示例#3
0
 public function actionRegister($customer = null, $do = true)
 {
     if ($customer !== null) {
         try {
             $role = Role::findAllByName('customer');
             $identity = new Identity();
             $user = $identity->register($customer, $role);
             $identity->login($user);
             $this->app->flash->message = 'Welcome to hell';
             $this->redirect('/sales/categories');
         } catch (\App\Components\Auth\MultiException $e) {
             $this->data->errors = $e;
         }
         $this->data->email = $customer->email;
         $this->data->password = $customer->password;
         $this->data->password2 = $customer->password2;
         $this->data->firstname = $customer->firstname;
         $this->data->lastname = $customer->lastname;
         $this->data->phonenum = $customer->phonenum;
     }
 }