Fixed issue #101

This commit is contained in:
Rooty 2023-01-08 10:06:36 +01:00
parent f71e773858
commit ff1a2a5f8a
4 changed files with 30 additions and 16 deletions

View File

@ -23,7 +23,10 @@
<mx:bloc id="blocSubscription">
<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="href:urlActionNewSubscription"><i class="fa fa-lg fa-handshake-o"></i> <mx:text id="NEWSUBSCRIPTION"/></a> <!--handshake-o -->
</mx:bloc id="blocSubscription">
<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="href:urlActionForgotPassword"><i class="fa fa-lg fa-cut-key"></i> <mx:text id="FORGOTPASSWORD"/></a> <!--cut-key-->
<mx:bloc id="blocForgotAuthPassword">
<!--<a class="btn btn-block btn-outline-secondary btn-lg btn-sm" role="button" aria-pressed="true" mXattribut="formaction:urlActionForgotPassword"><i class="fa fa-lg fa-cut-key"></i> <mx:text id="FORGOTPASSWORD"/></a> -->
<button type="submit" id="btnForgotPassword" class="btn btn-block btn-outline-secondary btn-lg btn-sm" mXattribut="formaction:urlActionForgotPassword" aria-pressed="true" value="<mx:text id="FORGOTPASSWORD"/>" title="<mx:text id="FORGOTPASSWORD"/>"><i class="fa fa-lg fa-sign-in"></i><mx:text id="FORGOTPASSWORD"/></button>
</mx:bloc id="blocForgotAuthPassword">
</form>
</div>
</li>

View File

@ -113,33 +113,34 @@ class NavigationPrint extends Printing
if( $NodeSettings->getTwitter() && $NodeSettings->getTwitter()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkTwitter.twitter", $NodeSettings->getTwitter()); } else $MaTemplate->MxBloc("blocSLinks.linkTwitter", "DELETE");
/* Link Facebook */
if( $NodeSettings->getFacebook() && $NodeSettings->getFacebook()!="" ) { $MaTemplate->MxAttribut("blocSLinks.linkFacebook.facebook", $NodeSettings->getFacebook()); } else $MaTemplate->MxBloc("blocSLinks.linkFacebook", "DELETE");
// BLOC INFOS UTILISATEUR
if ($GLOBALS["SYSTEM_USER_SESSION"]->user->getId()==$GLOBALS["SYSTEM_DEFAULT_USER_GUEST"])
{
$nodeId = $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId;
/* création de l'url de login */
$url =$_SERVER['SCRIPT_NAME'];
$url.="?system=authSession";
$url=addIdToUrl($url);
$tabObject =$this->getObjectSon(eid());
$tabObject =$GLOBALS["SYSTEM_CONTROL"]->getListObjectForNavigation($nodeId);
for ($i=0; $i<count($tabObject);$i++)
{
echo $tabObject[$i][0]->getClassName();
if ($tabObject[$i][0]->getClassName()=="Home")
{
$urlArray["id"]=$tabObject[$i][1]->getId();
}
}
/* Création de l'URL pour nouveau compte */
$urlNewAccount = $_SERVER['SCRIPT_NAME'];
$urlNewAccount.= "?system=authNewAccount";
$urlNewAccount = addIdToUrl($urlNewAccount);
$MaTemplate->MxAttribut("urlActionNewAccount", Navigation::formatUrl($urlArray["id"],"Home","formLecture","",recupCommunity()));
$MaTemplate->MxAttribut("urlActionNewSubscription", Navigation::formatUrl($urlArray["id"],"Home","formLectureAdh","",recupCommunity()));
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
$urlForgotPassword.= "?system=authForgotPassword";

View File

@ -113,12 +113,6 @@ class UserPrint extends Printing
$MaTemplate->MxBloc("blocRegister", "delete");
}
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
// $urlForgotPassword.= "?system=authForgotPassword";
$urlForgotPassword.= "?msg=forgotPasswordTempDisabled";
$urlForgotPassword = addIdToUrl($urlForgotPassword);
/* picto en fonction de la template */
$MaTemplate->MxImage("pictoAuth", $GLOBALS['CONF_DATA_PATH']."data/template/".$GLOBALS['SYSTEM_TEMPLATE_DIR']."media/picto/authorise.png");
$MaTemplate->MxText("auth", getMessage("UserPrintAuth"));
@ -126,8 +120,21 @@ class UserPrint extends Printing
$MaTemplate->MxFormField("login", "text", "login", "", "title='".getMessage("tipUserPrintLogin")."'");
$MaTemplate->MxText("PASSWORD", getMessage("UserPrintPassword"));
$MaTemplate->MxFormField("password", "password", "password", "", "title='".getMessage("tipUserPrintPassword")."'");
$MaTemplate->MxAttribut("urlActionForgotPassword", $urlForgotPassword);
$MaTemplate->MxText("FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
// var_dump($GLOBALS['CONF_LOST_PASSWORD']);
if( $GLOBALS['CONF_LOST_PASSWORD'] ) {
/* Création de l'URL pour rappel du mot de passe */
$urlForgotPassword = $_SERVER['SCRIPT_NAME'];
$urlForgotPassword.= "?system=authForgotPassword";
// $urlForgotPassword.= "?msg=forgotPasswordTempDisabled";
$urlForgotPassword = addIdToUrl($urlForgotPassword);
$MaTemplate->MxAttribut("blocForgotAuthPassword".".urlActionForgotPassword", $urlForgotPassword);
$MaTemplate->MxText("blocForgotAuthPassword".".FORGOTPASSWORD", getMessage("UserPrintForgotPassword"));
} else {
$MaTemplate->MxBloc("blocForgotAuthPassword", "delete");
}
$MaTemplate->MxAttribut("urlActionLogin", $url);
$MaTemplate->MxAttribut("BtnEnter", getMessage("UserPrintEnter"));
$MaTemplate->MxText("BtnEnter", getMessage("UserPrintEnter"));

View File

@ -434,7 +434,10 @@ var $currentCoordinationObject=null;
case "authNewAccount":
case "authForgotPassword":
$this->__authForgotPassword();
$login =(isset($_GET["login"]))?$_GET["login"]:((isset($_POST["login"]))?$_POST["login"]:null);
if (!is_null($login)) {
$this->__authForgotPassword($login);
}
break;
case "close":
case "disco":
@ -610,7 +613,7 @@ var $currentCoordinationObject=null;
* @access private
* @return booleen
*/
function __authForgotPassword()
function __authForgotPassword($login)
{
global $CONF_MESSAGE_FILE, $CONF_PAGE_EXECUTION, $CONF_AUTH_FILE, $CONF_AUTH_ALIEN_FILE;