|
|
| 204 |
// FIXME Check result and handle failures |
204 |
// FIXME Check result and handle failures |
| 205 |
$this->defaultAuth->doCreateUser($user); |
205 |
$this->defaultAuth->doCreateUser($user); |
| 206 |
$user->setAuthId($this->defaultAuth->authId); |
206 |
$user->setAuthId($this->defaultAuth->authId); |
| 207 |
$user->setPassword(Validation::encryptCredentials($user->getUserId(), Validation::generatePassword())); // Used for PW reset hash only |
|
|
| 208 |
} else { |
| 209 |
$user->setPassword(Validation::encryptCredentials($this->getData('username'), $this->getData('password'))); |
| 210 |
} |
207 |
} |
|
|
208 |
$user->setPassword(Validation::encryptCredentials($this->getData('username'), $this->getData('password'))); |
| 211 |
|
209 |
|
| 212 |
$userDao = &DAORegistry::getDAO('UserDAO'); |
210 |
$userDao = &DAORegistry::getDAO('UserDAO'); |
| 213 |
$userDao->insertUser($user); |
211 |
$userDao->insertUser($user); |