Commit 5a49b74a authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Admin page: Show logincode on user page

parent 80043c2f
......@@ -1061,6 +1061,7 @@ pub fn admin_show_user<T: MedalConnection>(conn: &T, user_id: i32, session_token
let (user, opt_group) = conn.get_user_and_group_by_id(user_id).ok_or(MedalError::AccessDenied)?;
fill_user_data(&user, &mut data);
data.insert("logincode".to_string(), to_json(&user.logincode));
if let Some(group) = opt_group {
data.insert("group_id".to_string(), to_json(&;
<h1>Benutzer: {{firstname}} {{lastname}}</h1>
Benutzername: {{username}}<br>
{{#if username}}Benutzername: {{username}}<br>{{/if}}
{{#if logincode}}Logincode: {{logincode}}<br>{{/if}}
{{#if teacher}}Ist Lehrer <br>{{/if}}
{{#if logged_id}}Ist eingeloggt <br>{{/if}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment