Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuki Sawada <kazuki@6715.jp>2016-02-25 11:58:36 +0300
committerKazuki Sawada <kazuki@6715.jp>2016-02-25 11:58:36 +0300
commit6972c657e02be115b95e58e7395201f677577899 (patch)
tree044305c17a166a5ba34d146c6487ff5113e52185 /user_saml
parentdd5b38b3c0ee37bcec0b776329ded440df1785c9 (diff)
replaced OC_Log (removed from ownCloud 8.2) with OCP\Util
Diffstat (limited to 'user_saml')
-rw-r--r--user_saml/appinfo/app.php2
-rw-r--r--user_saml/lib/hooks.php14
-rw-r--r--user_saml/user_saml.php2
3 files changed, 9 insertions, 9 deletions
diff --git a/user_saml/appinfo/app.php b/user_saml/appinfo/app.php
index 9ddb1b3b9..2e280f998 100644
--- a/user_saml/appinfo/app.php
+++ b/user_saml/appinfo/app.php
@@ -54,7 +54,7 @@ if (OCP\App::isEnabled('user_saml')) {
if (!OC_User::login('', '')) {
$error = true;
- OC_Log::write('saml','Error trying to authenticate the user', OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Error trying to authenticate the user', OCP\Util::DEBUG);
}
if (isset($_GET["linktoapp"])) {
diff --git a/user_saml/lib/hooks.php b/user_saml/lib/hooks.php
index f66e99e4e..7ed5e2263 100644
--- a/user_saml/lib/hooks.php
+++ b/user_saml/lib/hooks.php
@@ -38,7 +38,7 @@ class OC_USER_SAML_Hooks {
if (array_key_exists($usernameMapping, $attributes) && !empty($attributes[$usernameMapping][0])) {
$usernameFound = true;
$uid = $attributes[$usernameMapping][0];
- OC_Log::write('saml','Authenticated user '.$uid,OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Authenticated user '.$uid,OCP\Util::DEBUG);
break;
}
}
@@ -67,7 +67,7 @@ class OC_USER_SAML_Hooks {
static public function logout($parameters) {
$samlBackend = new OC_USER_SAML();
if ($samlBackend->auth->isAuthenticated()) {
- OC_Log::write('saml', 'Executing SAML logout', OC_Log::DEBUG);
+ OCP\Util::writeLog('saml', 'Executing SAML logout', OCP\Util::DEBUG);
unset($_COOKIE["SimpleSAMLAuthToken"]);
setcookie('SimpleSAMLAuthToken', '', time()-3600, \OC::$WEBROOT);
setcookie('SimpleSAMLAuthToken', '', time()-3600, \OC::$WEBROOT . '/');
@@ -150,7 +150,7 @@ function update_mail($uid, $email) {
$config = \OC::$server->getConfig();
if ($email != $config->getUserValue($uid, 'settings', 'email', '')) {
$config->setUserValue($uid, 'settings', 'email', $email);
- OC_Log::write('saml','Set email "'.$email.'" for the user: '.$uid, OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Set email "'.$email.'" for the user: '.$uid, OCP\Util::DEBUG);
}
}
@@ -162,23 +162,23 @@ function update_groups($uid, $groups, $protectedGroups=array(), $just_created=fa
foreach($old_groups as $group) {
if(!in_array($group, $protectedGroups) && !in_array($group, $groups)) {
OC_Group::removeFromGroup($uid,$group);
- OC_Log::write('saml','Removed "'.$uid.'" from the group "'.$group.'"', OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Removed "'.$uid.'" from the group "'.$group.'"', OCP\Util::DEBUG);
}
}
}
foreach($groups as $group) {
if (preg_match( '/[^a-zA-Z0-9 _\.@\-]/', $group)) {
- OC_Log::write('saml','Invalid group "'.$group.'", allowed chars "a-zA-Z0-9" and "_.@-" ',OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Invalid group "'.$group.'", allowed chars "a-zA-Z0-9" and "_.@-" ',OCP\Util::DEBUG);
}
else {
if (!OC_Group::inGroup($uid, $group)) {
if (!OC_Group::groupExists($group)) {
OC_Group::createGroup($group);
- OC_Log::write('saml','New group created: '.$group, OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','New group created: '.$group, OCP\Util::DEBUG);
}
OC_Group::addToGroup($uid, $group);
- OC_Log::write('saml','Added "'.$uid.'" to the group "'.$group.'"', OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Added "'.$uid.'" to the group "'.$group.'"', OCP\Util::DEBUG);
}
}
}
diff --git a/user_saml/user_saml.php b/user_saml/user_saml.php
index 5ffa1a392..9f10c37b1 100644
--- a/user_saml/user_saml.php
+++ b/user_saml/user_saml.php
@@ -88,7 +88,7 @@ class OC_USER_SAML extends OC_User_Backend {
}
}
- OC_Log::write('saml','Not found attribute used to get the username at the requested saml attribute assertion',OC_Log::DEBUG);
+ OCP\Util::writeLog('saml','Not found attribute used to get the username at the requested saml attribute assertion', OCP\Util::DEBUG);
$secure_cookie = OC_Config::getValue("forcessl", false);
$expires = time() + OC_Config::getValue('remember_login_cookie_lifetime', 60*60*24*15);
setcookie("user_saml_logged_in", "1", $expires, '', '', $secure_cookie);