// 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();
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