Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added compatibility in user->auth from 1.3 backups...$CFG->auth is used

  • Loading branch information...
commit f496860a90497b1bab4aeb5cf8959c96d4a93756 1 parent 3393524
stronk7 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 backup/restorelib.php
View
4 backup/restorelib.php
@@ -810,12 +810,14 @@ function restore_create_users($restore,$xml_file) {
$user->description = restore_decode_absolute_links(addslashes($user->description));
//We need to analyse the AUTH field to recode it:
+ // - if the field isn't set, we are in a pre 1.4 backup and we'll
+ // use $CFG->auth
// - if the destination site has any kind of INTERNAL authentication,
// then apply it to the new user.
// - if the destination site has any kind of EXTERNAL authentication,
// then leave the original authentication of the user.
- if (is_internal_auth($CFG->auth)) {
+ if ((! isset($user->auth)) || is_internal_auth($CFG->auth)) {
$user->auth = $CFG->auth;
}
Please sign in to comment.
Something went wrong with that request. Please try again.