You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Dolibarr 18, when creating a new user (i.e., when object=NULL), I noticed an issue at the top of the /user/card.php file where the $id value is being overwritten with:
if (empty($id)) {
$id = $user->id;
}
While this might make sense in certain scenarios, it shouldn't reassign the value when creating a new user. In this case, this re-assignment is causing that Dolibarr LOAD EXTRAFIELDS VALUES of the logged user (me when creating a new user)!!
A more suitable condition might be:
if (empty($id) && $action!='create') {
$id = $user->id;
}
Note 1: I've tested this minor change, and it worked well. @eldy, could you please incorporate this change into the code? I've checked the develop-branch, and it hasn't been fixed yet.
Note 2: this conditional re-assignment doesn't exist on Dolibarr 17 branch !
Environment Version
18.0
Environment OS
No response
Environment Web server
No response
Environment PHP
No response
Environment Database
No response
Environment URL(s)
No response
Expected and actual behavior
No response
Steps to reproduce the behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered:
Bug
On Dolibarr 18, when creating a new user (i.e., when object=NULL), I noticed an issue at the top of the
/user/card.php
file where the$id
value is being overwritten with:While this might make sense in certain scenarios, it shouldn't reassign the value when creating a new user. In this case, this re-assignment is causing that Dolibarr LOAD EXTRAFIELDS VALUES of the logged user (me when creating a new user)!!
A more suitable condition might be:
Environment Version
18.0
Environment OS
No response
Environment Web server
No response
Environment PHP
No response
Environment Database
No response
Environment URL(s)
No response
Expected and actual behavior
No response
Steps to reproduce the behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered: