ich nutze das folgende "Passwort ändern" Modul in Contenido Version 4.8.12. Leider klappt die "Passwort ändern" Funktion nicht. Sobald ich im Frontend auf OK klicke auf der Passwort ändern-Seite gehts wieder zur Startseite obwohl eine Bestätigung laut Modulcode ausgegeben werden soll. Eine Fehlermeldung gibts es leider keine, auch nicht im Errorlog von Contenido. Hier das Modul:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Passwort ändern
* Author(s) : HerrB
* Copyright : HerrB
* Created : 31.03.2006
************************************************/
cInclude("classes", "class.frontend.users.php");
$frontendusers = new FrontendUserCollection;
$frontendusers->select("idclient = '$client' AND username = '".urlencode($auth->auth[uname])."'");
if ($frontenduser = $frontendusers->next()) {
$idfrontend = $frontenduser->get("idfrontenduser");
$strMsg = "";
if ($_REQUEST["action"] == "save") {
if ($_REQUEST["oldpw"] != "" || $_REQUEST["newpw1"] != "" || $_REQUEST["newpw2"] != "") {
if ($_REQUEST["oldpw"] == "") {
$strMsg = mi18n("If changing the password please provide the current password.");
} else if ($_REQUEST["newpw1"] == "" || $_REQUEST["newpw2"] == "") {
$strMsg = mi18n("If changing the password please specify new password and retype the new password to avoid typos.");
} else if (md5($_REQUEST["oldpw"]) != $frontenduser->get("password")) {
$strMsg = mi18n("Old password is wrong.");
} else if ($_REQUEST["newpw1"] != $_REQUEST["newpw2"]) {
$strMsg = mi18n("If changing the password the new password and the retyped new password must be equal.");
} else if (strlen($_REQUEST["newpw1"]) > 24) {
$strMsg = mi18n("If changing the password please specify a new password with 24 characters max..");
} else if (strlen($_REQUEST["newpw1"]) < 6) {
$strMsg = mi18n("If changing the password please specify a new password with at least 6 characters.");
}
}
if ($strMsg == "" && $_REQUEST["oldpw"] != "") {
$frontenduser->set("password", $_REQUEST["newpw1"]);
$frontenduser->store();
$strMsg = mi18n("Changes has been saved.");
} else {
$strMsg = '<font color="#FF0000">'.$strMsg.'</font>';
}
}
echo '<form name="frmProfile" method="post" action="'.$auth->url().'">',chr(10);
echo ' <table cellspacing="0"> ',chr(10);
echo ' <tr>',chr(10);
echo ' <td colspan="2"><p>'.mi18n("Change Password:").'</p></td>',chr(10);
echo ' </tr>',chr(10);
if ($strMsg != "") {
echo ' <tr>',chr(10);
echo ' <td colspan="2"><p> -- '.$strMsg.' -- </p></td>',chr(10);
echo ' </tr>',chr(10);
}
echo ' <tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td style="width: 150px;"><p>'.mi18n("Old password:").'</p></td>',chr(10);
echo ' <td class="detail_text"><input name="oldpw" type="password" size="24" maxlength="24"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td style="width: 150px;"><p>'.mi18n("New password:").'</p></td>',chr(10);
echo ' <td><input name="newpw1" type="password" size="24" maxlength="24"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td style="width: 150px;"><p>'.mi18n("Retype password:").'</p></td>',chr(10);
echo ' <td><input name="newpw2" type="password" size="24" maxlength="24"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td style="width: 150px;"> </td>',chr(10);
echo ' <td><input type="hidden" name="action" value="save"><input class="submit" name="subscribe" type="submit" id="subscribe" value="'.mi18n("OK").'"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' </table>',chr(10);
echo '</form>',chr(10);
}
?>
Funktioniert das Modul nicht weil es nicht für 4.8. geschieben wurde? Hat jemand eine Lösung für das Problem?