ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

Forums OroPlatform OroPlatform – Programming Questions How to add more information to User after login

This topic contains 1 reply, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 1 year, 3 months ago.

  • Creator
    Topic
  • #60748
    thinh2010
    thinh2010
    Participant

    Hi

    I have a system for student and teacher (and many other profiles). I assign User for each profile.
    Because I have many type of profile (teacher, student, program manager, … ), and each profile has some specific information, so that I cannot make it like a type of User.

    Now after login, I want to add more information in User. I mean when I get User via

    I can get additional information such as User is Student or Teacher, which class and program he belongs to, etc.

    Do anyone know the way to do?
    Thanks

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #60749
    Mike Kudelya
    Mike Kudelya
    Moderator

    Hi

    To User entity you can add for example Select field with options ‘Student’, ‘Teacher’, etc. If name of this field will be ‘custom_type’ you can access to it via ->getUser()->getCustomType()
    Also you can create custom entities – Class, Program, after that you may create relation fields (for example Many-to-One) on your User with this entities. This manipulations can be done via user interface (System -> Entities -> Entity Management) Do not forget click on red ‘Schema Update’ button when entity or field will be created.


Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

ssossossosso