44 lines
852 B
PHP
44 lines
852 B
PHP
|
<?php
|
||
|
|
||
|
require_once "../html/nuserver/nuconfig.php";
|
||
|
include "../html/nuserver/nudatabase.php";
|
||
|
|
||
|
|
||
|
require_once "tfunc.php";
|
||
|
|
||
|
if (isset( $_GET['reset'] )){
|
||
|
$community_id = wmde_getCommunityIdBySecret($_GET['reset']);
|
||
|
if (!$community_id){
|
||
|
$title = "Fehler";
|
||
|
include "wrongreset.tpl";
|
||
|
die;
|
||
|
}
|
||
|
wmde_DeleteSecret($_GET['reset']);
|
||
|
$password = wmde_randomStr(16);
|
||
|
wmde_setPass($community_id,$password);
|
||
|
$wikimails = wmde_getWikiMails($community_id);
|
||
|
|
||
|
$title = "WP:@ Zugangsdaten";
|
||
|
include "yourpassword.tpl";
|
||
|
die;
|
||
|
}
|
||
|
|
||
|
|
||
|
if (isset( $_POST['email']) ){
|
||
|
$s = wmde_sendPasswordResetMail($_POST['email']);
|
||
|
if (!$s){
|
||
|
# echo "Password already sent.";
|
||
|
}
|
||
|
$title = "WP:@ Passwort gesendet";
|
||
|
include "password_sent.tpl";
|
||
|
# echo "Sending password reset mail to: ".htmlspecialchars($_POST['email']);
|
||
|
die;
|
||
|
}
|
||
|
|
||
|
wmde_deleteOldSecrets();
|
||
|
|
||
|
showReset();
|
||
|
|
||
|
|
||
|
|