OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums 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 7 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34294

    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
  • #34295

    Mike Kudelya
    Participant

    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)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top