Some old backups can contain empties in user->picture, fix them before insert. Merged from 19_STABLE

This commit is contained in:
stronk7 2008-02-05 20:31:06 +00:00
parent 7019314ba4
commit b3238b3519

View File

@ -2381,7 +2381,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
// relink the descriptions
$user->description = stripslashes($user->description);
if (!empty($CFG->disableuserimages)) {
/// Disable pictures based on global setting or existing empty value (old backups can contain wrong empties)
if (!empty($CFG->disableuserimages) || empty($user->picture)) {
$user->picture = 0;
}