From 9585e029c626a5ab13d1329e953e836cb954be70 Mon Sep 17 00:00:00 2001 From: ZhouShimiao Date: Thu, 31 Oct 2024 15:12:31 +0800 Subject: [PATCH] =?UTF-8?q?PC=E5=88=9B=E5=BB=BA100=E7=94=A8=E6=88=B7?= =?UTF-8?q?=EF=BC=8C=20=E9=A6=96=E6=AC=A1=E5=88=9B=E5=BB=BA100=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoushimiao Change-Id: Id88e28cdb28670cedb3c33b59d31cf210c75259c --- .../accountmgr/src/osaccount/inner_os_account_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/accountmgr/src/osaccount/inner_os_account_manager.cpp b/services/accountmgr/src/osaccount/inner_os_account_manager.cpp index a154030cf..0d0a5e793 100644 --- a/services/accountmgr/src/osaccount/inner_os_account_manager.cpp +++ b/services/accountmgr/src/osaccount/inner_os_account_manager.cpp @@ -487,7 +487,9 @@ ErrCode IInnerOsAccountManager::CreateOsAccount(const std::string &localName, co ACCOUNT_LOGE("QueryOsAccountById error, errCode %{public}d.", code); return code; } - if (accountInfoOld.GetShortName().empty()) { + DomainAccountInfo domainAccountInfo; + accountInfoOld.GetDomainInfo(domainAccountInfo); + if (accountInfoOld.GetShortName().empty() && domainAccountInfo.accountName_.empty()) { accountInfoOld.SetType(type); accountInfoOld.SetLocalName(localName); accountInfoOld.SetShortName(shortName);