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:
authorMorris Jobke <hey@morrisjobke.de>2014-11-28 19:27:10 +0300
committerMorris Jobke <hey@morrisjobke.de>2014-11-28 19:27:10 +0300
commite77e42804c6b3962a76a46e5ad6012774dd7c2fc (patch)
tree31cb8b5ed692fdb549f3cbd7eab8dfd969639b53 /user_saml
parentdb537eaeb4260122db6ba894a3691f861ab171cf (diff)
migrate from OC_Preferences to DI config object
Diffstat (limited to 'user_saml')
-rw-r--r--user_saml/lib/hooks.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/user_saml/lib/hooks.php b/user_saml/lib/hooks.php
index 09ea63770..f66e99e4e 100644
--- a/user_saml/lib/hooks.php
+++ b/user_saml/lib/hooks.php
@@ -147,8 +147,9 @@ function update_user_data($uid, $attributes=array(), $just_created=false) {
function update_mail($uid, $email) {
- if ($email != OC_Preferences::getValue($uid, 'settings', 'email', '')) {
- OC_Preferences::setValue($uid, 'settings', 'email', $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);
}
}