Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

MembershipManager::createMembership() is accepting invalid account objects #540

Closed
pfrenssen opened this issue Jul 22, 2019 · 1 comment
Closed

Comments

@pfrenssen
Copy link
Contributor

MembershipManagerInterface::createMembership() is accepting objects of the type AccountInterface for the $user parameter. In the method it will then pass this to EntityOwnerInterface::setOwner() which only accepts UserInterface objects.

This means if we pass in an object that implements AccountInterface but not UserInterface then we will get a fatal error. This might happen for example by passing in an AccountProxy object or an AnonymousUserSession.

Scope of this ticket:

  • Change the signature of MembershipManagerInterface::createMembership() to accept UserInterface objects instead of AccountInterface objects.
  • Update the implementation at MembershipManager::createMembership().
pfrenssen added a commit that referenced this issue Feb 7, 2020
…account-objects

MembershipManager::createMembership() is accepting invalid account objects #540
@pfrenssen
Copy link
Contributor Author

Fixed in #603

@pfrenssen pfrenssen added this to the 8.x-1.0-alpha5 milestone Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant