mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix migration from old versions
This commit is contained in:
parent
3e278f09ed
commit
2d6bf94bef
|
|
@ -4500,11 +4500,15 @@ function migrate_user_photospath2()
|
|||
$user = $fuser; // To avoid error during migration
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid as uid from ".MAIN_DB_PREFIX."user"; // Get list of all users
|
||||
$sql = "SELECT rowid as uid, entity, photo from ".MAIN_DB_PREFIX."user"; // Get list of all users
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$fuser->fetch($obj->uid);
|
||||
//$fuser->fetch($obj->uid);
|
||||
$fuser->id = $obj->uid;
|
||||
$fuser->entity = $obj->entity;
|
||||
$fuser->photo = $obj->photo;
|
||||
|
||||
//echo '<hr>'.$fuser->id.' -> '.$fuser->entity;
|
||||
$entity = (empty($fuser->entity) ? 1 : $fuser->entity);
|
||||
if ($entity > 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user