Yii - two types of users



  • How do we organize two types of users on the website?

    For example:

    1. Customers, guests, etc.
    2. Facilities, website administrators, customer management

    By the way, I'll make it clear that the method isn't front-end is back-end. If it's trivial, then the front! This has to do with the fact that the adminca almost completely duplicates everything, and then what the hell is it?



  • Create a table of rights for groups and gender-specific features tinyint 1(or ENUM 0.1 for knowing interpretations in perverts), respectively 1 is right, 0 is not. Set up a group table, make Foreign key on Primary Key, the user table makes a field of the Group, which also makes Foreign Key Tables on Primary Key Group Tables.

    Well, I'd do it on the OBD. Well, there's a Yii on the server code, even though CodeIgniter has a zero code, no difference. ♪ ♪

    That is, for example, when authorizing the session, the current importance of the group, something like $_SESSION['user_group'] = $sqlResultArray['group'] and can already be identified by the current group, in any case this is all the subtle implementation and specific needs


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2