diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 80150a5c53e..1b8e91f78e5 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -909,9 +909,11 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho
$reshook = $hookmanager->executeHooks('getAccessForbiddenMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
print $hookmanager->resPrint;
if (empty($reshook)) {
+ $langs->loadLangs(array("errors"));
if ($user->login) {
print $langs->trans("CurrentLogin").': '.$user->login.'
';
print $langs->trans("ErrorForbidden2", $langs->transnoentitiesnoconv("Home"), $langs->transnoentitiesnoconv("Users"));
+ print $langs->trans("ErrorForbidden4");
} else {
print $langs->trans("ErrorForbidden3");
}
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 0c0c3c7699d..cb0d4f1def0 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -111,6 +111,7 @@ ErrorFailedToLoadRSSFile=Fails to get RSS feed. Try to add constant MAIN_SIMPLEX
ErrorForbidden=Access denied.
You try to access to a page, area or feature of a disabled module or without being in an authenticated session or that is not allowed to your user.
ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s.
ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...).
+ErrorForbidden4=Note: clear your browser cookies to destroy existing sessions for this login.
ErrorNoImagickReadimage=Class Imagick is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display.
ErrorRecordAlreadyExists=Record already exists
ErrorLabelAlreadyExists=This label already exists
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 05ec2b969b3..3e06d0a2a2d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1166,7 +1166,7 @@ if (!defined('NOLOGIN')) {
// Check if user is active
if ($user->statut < 1) {
// If not active, we refuse the user
- $langs->load("other");
+ $langs->loadLangs(array("errors", "other"));
dol_syslog("Authentication KO as login is disabled", LOG_NOTICE);
accessforbidden($langs->trans("ErrorLoginDisabled"));
exit;