diff --git a/services/ans/src/advanced_notification_inline.cpp b/services/ans/src/advanced_notification_inline.cpp index 9ff5a87c4dcf4be68960ebd52f210d4a33fa5e21..498a0c6cb1288f187b82f1013f5edec923e01253 100644 --- a/services/ans/src/advanced_notification_inline.cpp +++ b/services/ans/src/advanced_notification_inline.cpp @@ -17,6 +17,7 @@ #include #include +#include "ans_const_define.h" #include "ans_inner_errors.h" #include "ans_log_wrapper.h" #include "access_token_helper.h" @@ -47,10 +48,9 @@ inline std::string GetClientBundleName() inline int32_t CheckUserIdParams(const int userId) { - if (OsAccountManagerHelper::IsSystemAccount(userId)) { - if (!OsAccountManagerHelper::GetInstance().CheckUserExists(userId)) { - return ERROR_USER_NOT_EXIST; - } + if (userId != SUBSCRIBE_USER_ALL && userId != SUBSCRIBE_USER_INIT + && !OsAccountManagerHelper::GetInstance().CheckUserExists(userId)) { + return ERROR_USER_NOT_EXIST; } return ERR_OK; }