getUserIdByUserName(USER_NAME) || USER_EMAIL != $administration->getEmailByUserId($administration->getUserIdByUserName(USER_NAME)) ) { return -2; } $new_password = $administration->getRandomPassword(); //change 06/2019 - store more secure passwords in database! $user = new User($administration->getUserIdByUserName(USER_NAME)); $result = $user->setPasswordWithoutTicket($new_password); if($result == false) { return -3; } $email_subject = "Neues Geoportal Passwort"; $email_body = sprintf("Ihr neues Geoportal Passwort lautet: %s",$new_password); if(!$administration->sendEmail(NULL,NULL,USER_EMAIL,USER_NAME,$email_subject,$email_body,$error_msg)) { return -4; } return 1; } $success = forgotten_password(); ?>