summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-27 03:11:11 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-27 03:11:11 -0700
commitaa069833459e2d2f4c512efc7e0282a13f43fc8d (patch)
treeef2df1fa83ae7f15fad99e413380662c087028f6 /settings
parenta50e215c9e6d1bf935b36388bd53d3e03dbe718d (diff)
parent1ee4b680f63246c8ae5f3e647ba812ffe6ab57b3 (diff)
downloadnextcloud-server-aa069833459e2d2f4c512efc7e0282a13f43fc8d.tar.gz
nextcloud-server-aa069833459e2d2f4c512efc7e0282a13f43fc8d.zip
Merge pull request #5552 from owncloud/admin-warninghomeexistsfix
Fixed user dir existence check when creating new user
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/createuser.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php
index 915fcaf2d42..94b56fa0349 100644
--- a/settings/ajax/createuser.php
+++ b/settings/ajax/createuser.php
@@ -28,6 +28,10 @@ $password = $_POST["password"];
// Return Success story
try {
+ // check whether the user's files home exists
+ $userDirectory = OC_User::getHome($username) . '/files/';
+ $homeExists = file_exists($userDirectory);
+
if (!OC_User::createUser($username, $password)) {
OC_JSON::error(array('data' => array( 'message' => 'User creation failed for '.$username )));
exit();
@@ -39,10 +43,6 @@ try {
OC_Group::addToGroup( $username, $i );
}
- // check whether the user's files home exists
- $userDirectory = OC_User::getHome($username) . '/files/';
- $homeExists = file_exists($userDirectory);
-
OC_JSON::success(array("data" =>
array(
// returns whether the home already existed