diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-13 20:53:45 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-13 20:53:56 +0200 |
commit | 1a2ab2ef6881ce4f9e53a84f53ee5e578427434e (patch) | |
tree | 1897bbfb9ba03cc781338f3dedfdc37ae6a51255 /lib/user.php | |
parent | 77e2387d94b7f6c9574cbed8a5d242628391906c (diff) | |
download | nextcloud-server-1a2ab2ef6881ce4f9e53a84f53ee5e578427434e.tar.gz nextcloud-server-1a2ab2ef6881ce4f9e53a84f53ee5e578427434e.zip |
prevent user creation with empty password
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/user.php b/lib/user.php index 816caff8dd8..e409fe4e501 100644 --- a/lib/user.php +++ b/lib/user.php @@ -123,6 +123,11 @@ class OC_User { if(trim($uid) == ''){ throw new Exception('A valid username must be provided'); } + // No empty password + if(trim($password) == ''){ + throw new Exception('A valid password must be provided'); + } + // Check if user already exists if( self::userExists($uid) ){ throw new Exception('The username is already being used'); |