diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-11-28 19:27:10 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-11-28 19:27:10 +0300 |
commit | e77e42804c6b3962a76a46e5ad6012774dd7c2fc (patch) | |
tree | 31cb8b5ed692fdb549f3cbd7eab8dfd969639b53 /user_saml | |
parent | db537eaeb4260122db6ba894a3691f861ab171cf (diff) |
migrate from OC_Preferences to DI config object
Diffstat (limited to 'user_saml')
-rw-r--r-- | user_saml/lib/hooks.php | 5 |
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); } } |