diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 9ee9bcae43e..f5566cc30e7 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2426,7 +2426,7 @@ class User extends CommonObject $url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword'; $url .= '&username='.urlencode($this->login)."&passworduidhash=".urlencode(dol_hash($password.'-'.$this->id.'-'.$dolibarr_main_instance_unique_id)); if (!empty($conf->multicompany->enabled)) { - $url .= '&entity='.(!empty($user->entity) ? $user->entity : 1); + $url .= '&entity='.(!empty($this->entity) ? $this->entity : 1); } $msgishtml = 1;