fixed the student_id

This commit is contained in:
Rhywden
2026-08-23 20:19:06 +02:00
parent 59eaa9b8e8
commit 81327b6553
2 changed files with 4 additions and 5 deletions
@@ -1,5 +1,4 @@
@page "/students/questionaire"
@using System.Security.Claims
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject Fluxor.IDispatcher Dispatcher
@@ -78,11 +77,11 @@
var authenticationState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
var user = authenticationState.User;
var studentId = user.FindFirst(ClaimTypes.NameIdentifier)?.Value ?? user.FindFirst("sub")?.Value ?? user.Identity?.Name;
var preferredUsername = user.FindFirst("preferred_username")?.Value;
if (!string.IsNullOrWhiteSpace(studentId))
if (!string.IsNullOrWhiteSpace(preferredUsername))
{
Dispatcher.Dispatch(new Wollmilchsau.Store.QuestionnaireStore.LoadQuestionnaire(studentId, user.FindFirst("classroom")?.Value));
Dispatcher.Dispatch(new Wollmilchsau.Store.QuestionnaireStore.LoadQuestionnaire(preferredUsername, user.FindFirst("classroom")?.Value));
}
}
+1 -1
View File
@@ -48,7 +48,7 @@
}
},
"LDAP": {
"LdapUri": "ldaps://bs18-hh.de:10636",
"LdapUri": "ldaps://212.12.36.11:10636",
"BindPassword": "skMXHFyf3fjW4iJhsoEyfQdc0wYthuVs6xim7BKhX3c5EZSuPcRrYYiGonynBnHW",
"BindDN": "cn=bs18ldap,ou=ldap,dc=bs18-hh,dc=de",
"BaseDN": "dc=bs18-hh,dc=de",