Beispiel #1
0
 public function process($data)
 {
     if ($this->isValid($data) !== true) {
         throw new C3op_Form_UserCreateException('Invalid data!');
     } else {
         $db = Zend_Registry::get('db');
         $userMapper = new C3op_Auth_UserMapper($db);
         $user = new C3op_Auth_User();
         $user->SetLogin($this->login->GetValue());
         $user->SetName($this->name->GetValue());
         $user->SetPassword($this->password->GetValue());
         $user->SetEmail($this->email->GetValue());
         $user->SetRole($this->role->GetValue());
         $userMapper->insert($user);
     }
 }