Skip to content
Snippets Groups Projects
Commit 8fd491f8 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Draft: Resolve "Neues-Passwort-Mail ist falsch"

Closes #4368

Merge request studip/studip!3166
parent a75e32af
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,10 @@ class NewPasswordController extends StudipController
$users = User::findByEmail(Request::get('mail'));
if (count($users) === 1) {
$user = $users[0];
setTempLanguage($user->id);
} else if (count($users) > 1) {
setTempLanguage($users[0]->id);
// there are mutliple accounts with this mail addresses!
$subject = sprintf(
......@@ -64,9 +66,11 @@ class NewPasswordController extends StudipController
$GLOBALS['UNI_CONTACT']
);
StudipMail::sendMessage($user->email, $subject, $mailbody);
StudipMail::sendMessage($users[0]->email, $subject, $mailbody);
restoreLanguage();
}
if ($user) {
// spam/abuse-protection
// if there are more than 5 tokens present, do NOT send another mail
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment