summaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-04-18 12:39:28 +0200
committerJakob Sack <kde@jakobsack.de>2011-04-18 12:39:28 +0200
commitda30671ec474bfa522d0a0b21d3e457437b9b57b (patch)
tree1776076ec122cb1c60d089d15abf6a674f474012 /lib/user.php
parentfe90bf4bdce4eb03722382ecbd054035d6b3c590 (diff)
downloadnextcloud-server-da30671ec474bfa522d0a0b21d3e457437b9b57b.tar.gz
nextcloud-server-da30671ec474bfa522d0a0b21d3e457437b9b57b.zip
More error checking in user management
Diffstat (limited to 'lib/user.php')
-rw-r--r--lib/user.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/user.php b/lib/user.php
index 51e4ab358e1..09501e59c58 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -118,6 +118,11 @@ class OC_USER {
if( !$uid ){
return false;
}
+ // Check if user already exists
+ if( in_array( $uid, self::getUsers())){
+ return false;
+ }
+
$run = true;
OC_HOOK::emit( "OC_USER", "pre_createUser", array( "run" => &$run, "uid" => $uid, "password" => $password ));