Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Stud.IP
Commits
ac2367fc
Commit
ac2367fc
authored
8 months ago
by
Rasmus Fuhse
Committed by
David Siegfried
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Draft: Resolve "Neues-Passwort-Mail ist falsch"
Closes #4368 Merge request
studip/studip!3166
parent
c8d06fae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/new_password.php
+30
-26
30 additions, 26 deletions
app/controllers/new_password.php
with
30 additions
and
26 deletions
app/controllers/new_password.php
+
30
−
26
View file @
ac2367fc
...
...
@@ -41,32 +41,36 @@ class NewPasswordController extends StudipController
$users
=
User
::
findByEmail
(
Request
::
get
(
'mail'
));
$user
=
$users
[
0
];
setTempLanguage
(
$user
->
id
);
// there are mutliple accounts with this mail addresses!
$subject
=
sprintf
(
_
(
"[Stud.IP - %s] Passwortänderung angefordert"
),
Config
::
get
()
->
UNI_NAME_CLEAN
);
$mailbody
=
sprintf
(
_
(
"Dies ist eine Informationsmail des Stud.IP-Systems
\n
"
.
"(Studienbegleitender Internetsupport von Präsenzlehre)
\n
- %s -
\n\n
"
.
"Für die Mail-Adresse %s wurde ein Link angefordert
\n
"
.
"um das Passwort zurückzusetzen.
\n
"
.
"Dieser Mail-Adresse sind jedoch mehrere Zugänge zugeordnet,
\n
"
.
"deshalb ist es nicht möglich, das Passwort hierüber zurückzusetzen.
\n
"
.
"Wenden sie sich bitte stattdessen an
\n
%s"
),
Config
::
get
()
->
UNI_NAME_CLEAN
,
$users
[
0
]
->
email
,
$GLOBALS
[
'UNI_CONTACT'
]
);
StudipMail
::
sendMessage
(
$user
->
email
,
$subject
,
$mailbody
);
restoreLanguage
();
if
(
count
(
$users
)
===
1
)
{
$user
=
$users
[
0
];
}
else
if
(
count
(
$users
)
>
1
)
{
setTempLanguage
(
$users
[
0
]
->
id
);
// there are mutliple accounts with this mail addresses!
$subject
=
sprintf
(
_
(
"[Stud.IP - %s] Passwortänderung angefordert"
),
Config
::
get
()
->
UNI_NAME_CLEAN
);
$mailbody
=
sprintf
(
_
(
"Dies ist eine Informationsmail des Stud.IP-Systems
\n
"
.
"(Studienbegleitender Internetsupport von Präsenzlehre)
\n
- %s -
\n\n
"
.
"Für die Mail-Adresse %s wurde ein Link angefordert
\n
"
.
"um das Passwort zurückzusetzen.
\n
"
.
"Dieser Mail-Adresse sind jedoch mehrere Zugänge zugeordnet,
\n
"
.
"deshalb ist es nicht möglich, das Passwort hierüber zurückzusetzen.
\n
"
.
"Wenden sie sich bitte stattdessen an
\n
%s"
),
Config
::
get
()
->
UNI_NAME_CLEAN
,
$users
[
0
]
->
email
,
$GLOBALS
[
'UNI_CONTACT'
]
);
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment