From 1a2ab2ef6881ce4f9e53a84f53ee5e578427434e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 13 May 2012 20:53:45 +0200 Subject: prevent user creation with empty password --- lib/user.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/user.php') 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'); -- cgit v1.2.3