Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

auth/db/lib (bugfix) only update mdl fields during login if 'onlogin'…

… set

Previous operation was update all moodle fields from the external database
during each login & sync ignoring this setting. Now if this setting is
'oncreation' then the field is only copied once (on creation of user).
  • Loading branch information...
commit dc77f7b55c1f3a80a1bcd24336a4cc2e65c5491e 1 parent c83afe4
martinlanghoff authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  auth/db/lib.php
2  auth/db/lib.php
@@ -211,7 +211,7 @@ function auth_sync_users ($do_updates=0) {
$updatekeys = array();
foreach ($all_keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/',$key, $match)) {
- if ($pcfg->{$match[0]}) { // if it has a true value
+ if ($pcfg->{$key} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
Please sign in to comment.
Something went wrong with that request. Please try again.