コード例 #1
0
ファイル: accountControl.php プロジェクト: jHolub/new_drutes
 public function action_register()
 {
     //$user = array()
     $email = $this->post['email_user'];
     $password = $this->post['password'];
     if ($password !== $this->post['passwordVerify']) {
         $this->msg = 'The password and confirmation password do not match.';
         return false;
     }
     if (AccountData::getAccountData($email)) {
         $this->msg = 'The account already registered';
         return false;
     }
     if (!AccountData::registerData($email, $password)) {
         $this->msg = 'Sorry your registration failed. Please go back and try again';
         return false;
     }
     $this->action_login();
     $this->msg = ' Successful sign in the DRUtES.';
     return [];
 }