/**
  * @return string
  */
 public function registerAction()
 {
     $userData = ['email' => $this->params('email', false), 'password' => $this->params('password', false), 'passwordVerify' => $this->params('password', false), 'username' => $this->params('username', false), 'display_name' => $this->params('display_name', false)];
     $user = $this->userService->register($userData);
     if (!$user) {
         $this->logger->err('User registration failed.');
         $this->logIssues();
     } else {
         $this->logger->info('User is registered successfully.');
     }
     return '';
 }
Exemple #2
0
 public function register(array $data)
 {
     $registerresult = parent::register($data);
     if ($registerresult !== false) {
         $userRole = array('user_id' => $registerresult->getId(), 'role_id' => 'user');
         $this->getRoleMapper()->insert($userRole);
     }
     return $registerresult;
 }