Fixes issues found in tests where $user  and $account was not an object on remove user data function.
Issue [#2283757] Inconsistency in error messages format
Issue [#2260375]
Issue #1923652 by ciss | mmillford: Added Using non-string callbacks generate warnings.