diff options
Diffstat (limited to 'settings/ajax/createuser.php')
-rw-r--r-- | settings/ajax/createuser.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index ccc2a5d402e..915fcaf2d42 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -38,8 +38,15 @@ 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 + "homeExists" => $homeExists, "username" => $username, "groups" => OC_Group::getUserGroups( $username )))); } catch (Exception $exception) { |