Skip to content
Snippets Groups Projects
Commit aa069833 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #5552 from owncloud/admin-warninghomeexistsfix

Fixed user dir existence check when creating new user
parents a50e215c 1ee4b680
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment