libaccountsservice emits bogus "has no username" warnings sometimes.
Submitted by Marius Vollmer
Assigned to Matthias Clasen @mclasen
Description
This happens for example when calling act_user_manager_get_user with a non-existing user.
The "has no username" warning should only be emitted for existing users (i.e., !act_user_is_nonexisting), and a failed GetAll call should mark the user as non-existing (if it is still unloaded at that time). A failed GetAll could emit a more specific warning.
GetAll can fail when FindUserByName/ID succeeds and returns a object path, but the object has already been unregistered again by the time the GetAll call is made. This can happen when asking for uid 0, for example, since a reload_users will unregister all explicitly excluded users, such as root.
FindUserByName/Id should probably fail for explicitly excluded users, but libaccountsservice still needs to be prepared for GetAll to fail, I'd say.
Anyway, it's just a warning... I have only noticed because we check for all unexpected messages in our test suite and this one pops up occasionally.