!2221 PC创建100用户, 首次创建100用户判断条件调整

Merge pull request !2221 from 周士淼/fix_1031_pc100
This commit is contained in:
openharmony_ci 2024-11-04 09:37:04 +00:00 committed by Gitee
commit bf17ebd07f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -496,7 +496,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);