ich setzte auf unserer Vereinswebseite folgendes Modul zu Änderung des Passwortes ein:
Change Password 1.0
HerrB, 15.11.2005
Nur Output
Das Modul hatte ursprünglich funktioniert.<?php
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 class="special" cellspacing="0"> ',chr(10);
echo ' <tr>',chr(10);
echo ' <td class="detail_headline" colspan="2">'.mi18n("Change Password:").'</td>',chr(10);
echo ' </tr>',chr(10);
if ($strMsg != "") {
echo ' <tr>',chr(10);
echo ' <td class="detail_text" colspan="2">'.$strMsg.'</td>',chr(10);
echo ' </tr>',chr(10);
}
echo ' <tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td class="detail_text" style="width: 100px;">'.mi18n("Old password:").'</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 class="detail_text" style="width: 100px;">'.mi18n("New password:").'</td>',chr(10);
echo ' <td class="detail_text"><input name="newpw1" type="password" size="24" maxlength="24"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td class="detail_text" style="width: 100px;">'.mi18n("Retype password:").'</td>',chr(10);
echo ' <td class="detail_text"><input name="newpw2" type="password" size="24" maxlength="24"></td>',chr(10);
echo ' </tr>',chr(10);
echo ' <tr>',chr(10);
echo ' <td class="detail_text" style="width: 100px;"> </td>',chr(10);
echo ' <td class="detail_text"><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);
}
?>
Mir ist der Fehler eher zufällig aufgefallen, da man den Menüpunkt nicht so oft anwählt.
Ich erhalte folgende Fehlermeldung:
Ich vermute dass der Fehler seit dem letzten Update der Contenido Version existiert.Fatal error: Call to undefined function: geteffectivesetting() in /srv/www/htdocs/****/html/*****/cms/front_crcloginform.inc.php on line 19
Wäre prima, wenn Sie mich bei der Fehlerdiagnose/ -such / -behebung unterstützen würden.
Im Voraus vielen Dank dafür.
/mr