changes merged from STABLE

This commit is contained in:
thepurpleblob
2005-06-09 14:04:38 +00:00
parent e868a0f3b0
commit b78fbdac9d
2 changed files with 8 additions and 3 deletions
+3 -2
View File
@@ -21,8 +21,9 @@
}
// check for session objects
assert_var_set( $info, 'info' );
assert_var_set( $course_header, 'course_header' );
if (empty($info)) or empty($course_info)) {
error( 'important information missing from SESSION' );
}
//If the restore object doesn't exist, we are going
//to check every variable individually and create it
+5 -1
View File
@@ -2252,9 +2252,13 @@ function update_user_record($username) {
if (function_exists('auth_get_userinfo')) {
$username = trim(moodle_strtolower($username)); /// just in case check text case
$oldinfo = get_record('user', 'username', $username, '','','','', 'username, auth');
$authconfig = get_config('auth/' . $oldinfo->auth);
if ($newinfo = auth_get_userinfo($username)) {
foreach ($newinfo as $key => $value){
if (!empty($CFG->{'auth_user_' . $key. '_updatelocal'})) {
$confkey = 'field_updatelocal_' . $key;
if (!empty($authconfig->$confkey) && $authconfig->$confkey === 'onlogin') {
$value = addslashes(stripslashes($value)); // Just in case
set_field('user', $key, $value, 'username', $username);
}