Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fachschaftsrat
Webtechnologien
Blushee
Commits
bf7736e4
Commit
bf7736e4
authored
Jan 19, 2017
by
Lusito
Browse files
public information reduced
parent
03612a68
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/User.php
View file @
bf7736e4
...
...
@@ -29,26 +29,26 @@ class UserController extends BaseController {
$deprecated
=
$user
[
'deprecated'
];
$deprecatedMsg
=
$deprecated
?
" (veraltet)"
:
""
;
$showMail
=
(
$isAdmin
||
$user
[
'show_mail'
]);
// filter out the student number
if
(
$showMail
)
$mail
=
vHtml
::
encryptText
(
preg_replace
(
"#\+[0-9]*@#"
,
'@'
,
$user
[
'mail'
]));
$mail
=
isset
(
$mail
)
?
(
$mail
.
$deprecatedMsg
)
:
""
;
$innerData
=
array
(
'Anzeigename:'
=>
htmlspecialchars
(
$user
[
'displayname'
]));
if
(
$this
->
user
->
isLoggedIn
())
{
$innerData
[
'Username:'
]
=
htmlspecialchars
(
$user
[
'name'
]
.
$deprecatedMsg
);
$innerData
[
'Vorname:'
]
=
htmlspecialchars
(
$user
[
'forename'
]);
$innerData
[
'Nachname:'
]
=
htmlspecialchars
(
$user
[
'surname'
]);
}
// admin can see all emails, others only if the user said yes
if
(
$isAdmin
||
$user
[
'show_mail'
])
{
// filter out the student number and encrypt
$innerData
[
'E-Mail:'
]
=
vHtml
::
encryptText
(
preg_replace
(
"#\+[0-9]*@#"
,
'@'
,
$user
[
'mail'
]));
}
$innerData
[
'Admin:'
]
=
$user
[
'admin'
]
?
"Ja"
:
"Nein"
;
$data
=
array
(
'data'
=>
array
(
'Anzeigename:'
=>
htmlspecialchars
(
$user
[
'displayname'
]),
'Username:'
=>
htmlspecialchars
(
$user
[
'name'
]
.
$deprecatedMsg
),
'Vorname:'
=>
htmlspecialchars
(
$user
[
'forename'
]),
'Nachname:'
=>
htmlspecialchars
(
$user
[
'surname'
]),
'E-Mail'
=>
$mail
,
'Admin'
=>
$user
[
'admin'
]
?
"Ja"
:
"Nein"
),
'data'
=>
$innerData
,
'userId'
=>
$id
,
'deprecated'
=>
$deprecated
,
'isAdmin'
=>
$isAdmin
);
if
(
!
$this
->
user
->
isLoggedIn
())
unset
(
$data
[
'data'
][
'Username:'
]);
vTemplate
::
pushView
(
'content'
,
'content/userinfo'
,
$data
);
$this
->
loadSidebar
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment