Laurent Destailleur 2 سال پیش
والد
کامیت
a716e6d95b
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 5 1
      htdocs/core/tpl/login.tpl.php
  2. 4 2
      htdocs/user/logout.php

+ 5 - 1
htdocs/core/tpl/login.tpl.php

@@ -284,6 +284,10 @@ if (!empty($morelogincontent)) {
 
 
 <?php
+if (isset($conf->file->main_authentication) && $conf->file->main_authentication == 'googleoauth') {
+	$forgetpasslink = '';
+}
+
 if ($forgetpasslink || $helpcenterlink) {
 	$moreparam = '';
 	if ($dol_hide_topmenu) {
@@ -301,7 +305,7 @@ if ($forgetpasslink || $helpcenterlink) {
 
 	echo '<br>';
 	echo '<div class="center" style="margin-top: 5px;">';
-	if ($forgetpasslink && (!isset($conf->file->main_authentication) || $conf->file->main_authentication != 'googleoauth')) {
+	if ($forgetpasslink) {
 		$url = DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam;
 		if (!empty($conf->global->MAIN_PASSWORD_FORGOTLINK)) {
 			$url = $conf->global->MAIN_PASSWORD_FORGOTLINK;

+ 4 - 2
htdocs/user/logout.php

@@ -45,13 +45,15 @@ if (!defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) {
 
 require_once '../main.inc.php';
 
-// This can happen only with a bookmark or forged url call.
+// This can happen only with a bookmark or a forged url call.
 if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser' || $_SESSION["dol_authmode"] == 'http')) {
 	unset($_SESSION["dol_login"]);
+	unset($_SESSION['dol_entity']);
+	unset($_SESSION['urlfrom']);
 	die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]);
 }
 
-global $conf, $langs, $user;
+//global $conf, $langs, $user;
 
 // Call trigger
 $result = $user->call_trigger('USER_LOGOUT', $user);