Redirect to profile creation when user has no identities
Also load persons by ID instead of preferred_username Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -119,6 +119,15 @@ export default class NavBar extends Vue {
|
||||
});
|
||||
if (data) {
|
||||
this.identities = data.identities.map(identity => new Person(identity));
|
||||
|
||||
// If we don't have any identities, the user has validated their account,
|
||||
// is logging for the first time but didn't create an identity somehow
|
||||
if (this.identities.length === 0) {
|
||||
await this.$router.push({
|
||||
name: RouteName.REGISTER_PROFILE,
|
||||
params: { email: this.currentUser.email, userAlreadyActivated: 'true' },
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user