diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-04-09 12:36:10 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-05-18 10:57:52 +0200 |
commit | 7a8072e958f6956c131ca12e5b7387bcadef1820 (patch) | |
tree | 37b3d34a30e1a09b41deb7d122746e374895c824 /apps/provisioning_api | |
parent | 73a3086945b41afa39debd89481c021934dedb67 (diff) | |
download | nextcloud-server-7a8072e958f6956c131ca12e5b7387bcadef1820.tar.gz nextcloud-server-7a8072e958f6956c131ca12e5b7387bcadef1820.zip |
Move core apps from OC_Log::write to OCP\Util
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/groups.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/lib/users.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/groups.php b/apps/provisioning_api/lib/groups.php index cd156110635..b379cea21ee 100644 --- a/apps/provisioning_api/lib/groups.php +++ b/apps/provisioning_api/lib/groups.php @@ -62,7 +62,7 @@ class Groups{ // Validate name $groupid = isset($_POST['groupid']) ? $_POST['groupid'] : ''; if( preg_match( '/[^a-zA-Z0-9 _\.@\-]/', $groupid ) || empty($groupid)){ - \OC_Log::write('provisioning_api', 'Attempt made to create group using invalid characters.', \OC_Log::ERROR); + \OCP\Util::writeLog('provisioning_api', 'Attempt made to create group using invalid characters.', \OCP\Util::ERROR); return new OC_OCS_Result(null, 101, 'Invalid group name'); } // Check if it exists diff --git a/apps/provisioning_api/lib/users.php b/apps/provisioning_api/lib/users.php index 43cf22b071b..bc3e6fe7215 100644 --- a/apps/provisioning_api/lib/users.php +++ b/apps/provisioning_api/lib/users.php @@ -44,15 +44,15 @@ class Users { $userId = isset($_POST['userid']) ? $_POST['userid'] : null; $password = isset($_POST['password']) ? $_POST['password'] : null; if(OC_User::userExists($userId)) { - \OC_Log::write('ocs_api', 'Failed addUser attempt: User already exists.', \OC_Log::ERROR); + \OCP\Util::writeLog('ocs_api', 'Failed addUser attempt: User already exists.', \OCP\Util::ERROR); return new OC_OCS_Result(null, 102, 'User already exists'); } else { try { OC_User::createUser($userId, $password); - \OC_Log::write('ocs_api', 'Successful addUser call with userid: '.$_POST['userid'], \OC_Log::INFO); + \OCP\Util::writeLog('ocs_api', 'Successful addUser call with userid: '.$_POST['userid'], \OCP\Util::INFO); return new OC_OCS_Result(null, 100); } catch (\Exception $e) { - \OC_Log::write('ocs_api', 'Failed addUser attempt with exception: '.$e->getMessage(), \OC_Log::ERROR); + \OCP\Util::writeLog('ocs_api', 'Failed addUser attempt with exception: '.$e->getMessage(), \OCP\Util::ERROR); return new OC_OCS_Result(null, 101, 'Bad request'); } } |