-
Notifications
You must be signed in to change notification settings - Fork 6
/
profile.php
50 lines (45 loc) · 1.23 KB
/
profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php include_once 'inc/header.php'; ?>
<?php
$user = AuthenticationManager::getAuthenticatedUser();
function getRoleInGerman($role){
switch ($role) {
case 'admin':
return 'Administrator';
break;
case 'student':
return 'Schüler';
break;
case 'teacher':
return 'Lehrer';
break;
default:
return 'Unbekannt';
}
}
?>
<div class='container'>
<h1>Benutzerprofil</h1>
<table class='table table-striped'>
<tr>
<th>Benutzername</th>
<td><?php echo escape($user->getUserName()); ?></td>
</tr>
<tr>
<th>Vorname</th>
<td><?php echo escape($user->getFirstName()); ?></td>
</tr>
<tr>
<th>Nachname</th>
<td><?php echo escape($user->getLastName()); ?></td>
</tr>
<tr>
<th>Klasse</th>
<td><?php echo escape($user->getClass()); ?></td>
</tr>
<tr>
<th>Rolle</th>
<td><?php echo escape(getRoleInGerman($user->getRole())); ?></td>
</tr>
</table>
</div>
<?php include_once 'inc/footer.php'; ?>