Merge pull request #2003 from emanuelschuetze/fix1820
Reload after login and logout (Fixes #1820)
This commit is contained in:
commit
2b239f2214
@ -132,10 +132,6 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
showClose: $stateParams.guest_enabled,
|
||||
closeByEscape: $stateParams.guest_enabled,
|
||||
closeByDocument: $stateParams.guest_enabled,
|
||||
preCloseCallback: function() {
|
||||
$state.go('home');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}]
|
||||
});
|
||||
@ -884,8 +880,7 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
$scope.logout = function () {
|
||||
$http.post('/users/logout/').then(function (response) {
|
||||
operator.setUser(null);
|
||||
// TODO: remove all data from cache and reload page
|
||||
// DS.flush();
|
||||
window.location.reload();
|
||||
});
|
||||
};
|
||||
}
|
||||
@ -926,6 +921,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
// Success: User logged in.
|
||||
operator.setUser(response.data.user_id);
|
||||
$scope.closeThisDialog();
|
||||
setTimeout(function(){
|
||||
window.location.replace('/');
|
||||
}, 1000);
|
||||
},
|
||||
function (response) {
|
||||
// Error: Username or password is not correct.
|
||||
|
Loading…
Reference in New Issue
Block a user