Skip to content

Commit

Permalink
FIX #4880. Lang should not be requied to fetch a user
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 29, 2016
1 parent 12c8ed6 commit 83dd308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/user/class/user.class.php
Expand Up @@ -162,7 +162,7 @@ function __construct($db)
*/
function fetch($id='', $login='',$sid='',$loadpersonalconf=1, $entity=-1)
{
global $langs, $conf, $user;
global $conf, $user;

// Clean parameters
$login=trim($login);
Expand Down Expand Up @@ -256,7 +256,7 @@ function fetch($id='', $login='',$sid='',$loadpersonalconf=1, $entity=-1)

$this->country_id = $obj->country_id;
$this->country_code = $obj->country_id?$obj->country_code:'';
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';
//$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';

$this->state_id = $obj->state_id;
$this->state_code = $obj->state_code;
Expand Down

1 comment on commit 83dd308

@hregis
Copy link
Contributor

@hregis hregis commented on 83dd308 Mar 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eldy ouch ! it is managed elsewhere?

Please sign in to comment.