By jonathanshaw on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
3.1.x
Introduced in version:
3.1.5
Issue links:
Description:
Before
The following methods are deprecated and removed from HostEntityInterface:
HostEntity::isUserRegistered($account)
HostEntity::isUserRegisteredInStates($account, $states = [])
HostEntity::isEmailRegistered($email)
HostEntity::isEmailRegisteredInStates($email, $states = [])These methods do not consider all edge cases necessary to find registrations for a registrant who is now or was previously anonymous.
After
Instead use
HostEntity::isRegistrant($account = NULL, $email = NULL, $states = []);
Two new methods are added to HostEntityInterface:
isRegistrant(AccountInterface ?$account = NULL, $email = NULL, array $states = [])
getRegistrationQuery(AccountInterface ?$account = NULL, $email = NULL)Most code should use these new methods, rather than directly querying registrations using their anon_mail or user_uid fields.