/** * @param array $data * @return mixed|void */ public function register($data) { //$bcrypt = new Bcrypt; //loato z radiem $user = new User(); $user->setCreated(date('Y-m-d H:i:s')); $user->setRoleId(1); //$user->setPassword(($bcrypt->create($data->password))); $user->setPassword(sha1($data->password)); $user->setEmail($data->email); $user->setUsername($data->username); $result = $this->userMapper->insert($user); return $result; }
/** * {@inheritDoc} */ public function setCreated(\DateTime $created) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreated', array($created)); return parent::setCreated($created); }