diff options
author | Björn Schießle <bjoern@schiessle.org> | 2016-08-08 11:17:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-08 11:17:07 +0200 |
commit | 727cd6aad0cc01570cbc74f8a589836e1cfb816f (patch) | |
tree | 38e7310113ab6f0ee8b18b7f8163ad38929f4084 /lib | |
parent | 344916de15f846de0f995ffac1b8dbeeb39f11f5 (diff) | |
parent | 5fb39bd0cb6df901d5d3936c1f6bbe5e800fca64 (diff) | |
download | nextcloud-server-727cd6aad0cc01570cbc74f8a589836e1cfb816f.tar.gz nextcloud-server-727cd6aad0cc01570cbc74f8a589836e1cfb816f.zip |
Merge pull request #711 from nextcloud/password-policy-on-createUser
Apply password policy on user creation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/Database.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 354609d0a98..e2cbebab2e4 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -83,6 +83,8 @@ class Database extends \OC\User\Backend implements \OCP\IUserBackend { */ public function createUser($uid, $password) { if (!$this->userExists($uid)) { + $event = new GenericEvent($password); + $this->eventDispatcher->dispatch('OCP\PasswordPolicy::validate', $event); $query = \OC_DB::prepare('INSERT INTO `*PREFIX*users` ( `uid`, `password` ) VALUES( ?, ? )'); $result = $query->execute(array($uid, \OC::$server->getHasher()->hash($password))); |