예제 #1
0
 /** @inheritdoc */
 public function fields()
 {
     $fields = parent::fields();
     // remove fields that contain sensitive information
     unset($fields['password'], $fields['authKey'], $fields['accessToken']);
     return $fields;
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUsers()
 {
     return $this->hasMany(User::className(), ['profileId' => 'id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDepartment()
 {
     return $this->hasOne(User::className(), ['id' => 'departmentId']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUsers()
 {
     return $this->hasMany(User::className(), ['departmentId' => 'id']);
 }