Additional field for User

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a.slyzhko
    Member
    • Oct 2023
    • 90

    Additional field for User

    Hi there!
    I have created not storable linkMultiple field in User entityDefs. To fill in it with data I need entity manager to perform some queries. My question is how to add this additional processing before User is passed to constructor or set with traits? I need this field on both front-end and back-end sides
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Maybe consider to do operations inside the class, where the user is passed to. You can call $user->loadLinkMultipleField('field');
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • a.slyzhko
      Member
      • Oct 2023
      • 90

      #3
      Will need this in many places. I don't want to copy/paste code. This is due to our company hierarchy. We have teams, sub-teams, supervisors. And I need to collect all supervised users recursively and pass their ids to supervisor user entity. This will be used in acl, services and other places. Any other ideas?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        You can wrap the User into another class, optionally to make it a container service for performance reasons.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...