diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-01 08:53:16 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-01 08:53:16 +0200 |
commit | 044d2ece07025b9a9cd5fa3c0514c65369ac9e4e (patch) | |
tree | a97fb08e37b0b3dbf31b8e0a3a7e6a2b5a7812f8 /apps/provisioning_api | |
parent | f25b71f70e878886a6f71faa43cd46c836ef13f7 (diff) | |
parent | 7a8072e958f6956c131ca12e5b7387bcadef1820 (diff) | |
download | nextcloud-server-044d2ece07025b9a9cd5fa3c0514c65369ac9e4e.tar.gz nextcloud-server-044d2ece07025b9a9cd5fa3c0514c65369ac9e4e.zip |
Merge pull request #15506 from rullzer/core_apps_oc_log2ocp_util
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 c1e492f53c1..81a5a6e5c30 100644 --- a/apps/provisioning_api/lib/groups.php +++ b/apps/provisioning_api/lib/groups.php @@ -63,7 +63,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 27fc5765d22..fada85b293d 100644 --- a/apps/provisioning_api/lib/users.php +++ b/apps/provisioning_api/lib/users.php @@ -48,15 +48,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'); } } |