Fix logout redirect
This commit is contained in:
@@ -89,7 +89,7 @@ export class UsersAndGroupsComponent
|
|||||||
$localize`Password has been changed, you will be logged out momentarily.`
|
$localize`Password has been changed, you will be logged out momentarily.`
|
||||||
)
|
)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/`
|
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
|
||||||
}, 2500)
|
}, 2500)
|
||||||
} else {
|
} else {
|
||||||
this.toastService.showInfo(
|
this.toastService.showInfo(
|
||||||
|
|||||||
@@ -137,14 +137,13 @@ export class ProfileEditDialogComponent implements OnInit, OnDestroy {
|
|||||||
.pipe(takeUntil(this.unsubscribeNotifier))
|
.pipe(takeUntil(this.unsubscribeNotifier))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: () => {
|
next: () => {
|
||||||
console.log('next', passwordChanged)
|
|
||||||
this.toastService.showInfo($localize`Profile updated successfully`)
|
this.toastService.showInfo($localize`Profile updated successfully`)
|
||||||
if (passwordChanged) {
|
if (passwordChanged) {
|
||||||
this.toastService.showInfo(
|
this.toastService.showInfo(
|
||||||
$localize`Password has been changed, you will be logged out momentarily.`
|
$localize`Password has been changed, you will be logged out momentarily.`
|
||||||
)
|
)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/`
|
window.location.href = `${window.location.origin}/accounts/logout/?next=/accounts/login/?next=/`
|
||||||
}, 2500)
|
}, 2500)
|
||||||
}
|
}
|
||||||
this.activeModal.close()
|
this.activeModal.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user