Merge branch 'develop' of https://github.com/dolibarr/dolibarr into develop
This commit is contained in:
commit
2900f8828a
@ -1961,17 +1961,21 @@ class User extends CommonObject
|
||||
$mesg = '';
|
||||
|
||||
$outputlangs=new Translate("", $conf);
|
||||
|
||||
if (isset($this->conf->MAIN_LANG_DEFAULT)
|
||||
&& $this->conf->MAIN_LANG_DEFAULT != 'auto')
|
||||
{ // If user has defined its own language (rare because in most cases, auto is used)
|
||||
$outputlangs->getDefaultLang($this->conf->MAIN_LANG_DEFAULT);
|
||||
}
|
||||
if($user->conf->MAIN_LANG_DEFAULT){
|
||||
$outputlangs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT);
|
||||
}
|
||||
else
|
||||
{ // If user has not defined its own language, we used current language
|
||||
$outputlangs=$langs;
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "errors", "users", "other"));
|
||||
|
||||
$appli=constant('DOL_APPLICATION_TITLE');
|
||||
@ -1986,7 +1990,6 @@ class User extends CommonObject
|
||||
if (! $changelater)
|
||||
{
|
||||
$url = $urlwithroot.'/';
|
||||
|
||||
$mesg.= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived").".\n";
|
||||
$mesg.= $outputlangs->transnoentitiesnoconv("NewKeyIs")." :\n\n";
|
||||
$mesg.= $outputlangs->transnoentitiesnoconv("Login")." = ".$this->login."\n";
|
||||
|
||||
@ -125,8 +125,9 @@ if ($action == 'buildnewpassword' && $username)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Success
|
||||
if ($edituser->send_password($user, $newpassword, 1) > 0)
|
||||
if ($edituser->send_password($edituser, $newpassword, 1) > 0)
|
||||
{
|
||||
|
||||
$message = '<div class="ok">'.$langs->trans("PasswordChangeRequestSent", $edituser->login, dolObfuscateEmail($edituser->email)).'</div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user