Password generation/reset tool for WP:@ mail addresses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
852 B

2 years ago
  1. <?php
  2. require_once "../html/nuserver/nuconfig.php";
  3. include "../html/nuserver/nudatabase.php";
  4. require_once "tfunc.php";
  5. if (isset( $_GET['reset'] )){
  6. $community_id = wmde_getCommunityIdBySecret($_GET['reset']);
  7. if (!$community_id){
  8. $title = "Fehler";
  9. include "wrongreset.tpl";
  10. die;
  11. }
  12. wmde_DeleteSecret($_GET['reset']);
  13. $password = wmde_randomStr(16);
  14. wmde_setPass($community_id,$password);
  15. $wikimails = wmde_getWikiMails($community_id);
  16. $title = "WP:@ Zugangsdaten";
  17. include "yourpassword.tpl";
  18. die;
  19. }
  20. if (isset( $_POST['email']) ){
  21. $s = wmde_sendPasswordResetMail($_POST['email']);
  22. if (!$s){
  23. # echo "Password already sent.";
  24. }
  25. $title = "WP:@ Passwort gesendet";
  26. include "password_sent.tpl";
  27. # echo "Sending password reset mail to: ".htmlspecialchars($_POST['email']);
  28. die;
  29. }
  30. wmde_deleteOldSecrets();
  31. showReset();