mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 03:45:25 +00:00
Show user's name upon successful login
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
//showPasswordDialog('expiration', createPasswordExpirationDialog, data['expire']);
|
||||
}
|
||||
else {
|
||||
d.resolve(redirectUrl(username, domain));
|
||||
d.resolve({ cn: data.cn, url: redirectUrl(username, domain) });
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -25,15 +25,16 @@
|
||||
function login() {
|
||||
vm.loginState = 'authenticating';
|
||||
Authentication.login(vm.creds)
|
||||
.then(function(url) {
|
||||
.then(function(data) {
|
||||
vm.loginState = 'logged';
|
||||
vm.cn = data.cn;
|
||||
|
||||
// Let the user see the succesfull message before reloading the page
|
||||
$timeout(function() {
|
||||
if (window.location.href === url)
|
||||
if (window.location.href === data.url)
|
||||
window.location.reload(true);
|
||||
else
|
||||
window.location.href = url;
|
||||
window.location.href = data.url;
|
||||
}, 1000);
|
||||
}, function(msg) {
|
||||
vm.loginState = 'error';
|
||||
|
||||
Reference in New Issue
Block a user