Fix updating guest user name
This commit is contained in:
parent
3e6090ca71
commit
e6a7ab5dfb
|
@ -2208,6 +2208,7 @@ define([
|
||||||
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
||||||
var name = change.asc_getUserName();
|
var name = change.asc_getUserName();
|
||||||
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
||||||
|
this._renameDialog && this._renameDialog.close();
|
||||||
Common.Utils.UserInfoParser.setCurrentName(name);
|
Common.Utils.UserInfoParser.setCurrentName(name);
|
||||||
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
||||||
|
|
||||||
|
|
|
@ -1857,6 +1857,7 @@ define([
|
||||||
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
||||||
var name = change.asc_getUserName();
|
var name = change.asc_getUserName();
|
||||||
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
||||||
|
this._renameDialog && this._renameDialog.close();
|
||||||
Common.Utils.UserInfoParser.setCurrentName(name);
|
Common.Utils.UserInfoParser.setCurrentName(name);
|
||||||
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
appHeader.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
||||||
|
|
||||||
|
|
|
@ -2217,6 +2217,7 @@ define([
|
||||||
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
if (change && this.appOptions.user.guest && this.appOptions.canRenameAnonymous && (change.asc_getIdOriginal() == this.appOptions.user.id)) { // change name of the current user
|
||||||
var name = change.asc_getUserName();
|
var name = change.asc_getUserName();
|
||||||
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
if (name && name !== Common.Utils.UserInfoParser.getCurrentName() ) {
|
||||||
|
this._renameDialog && this._renameDialog.close();
|
||||||
Common.Utils.UserInfoParser.setCurrentName(name);
|
Common.Utils.UserInfoParser.setCurrentName(name);
|
||||||
this.headerView.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
this.headerView.setUserName(Common.Utils.UserInfoParser.getParsedName(name));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue