/** @inheritdoc */ public function fields() { $fields = parent::fields(); // remove fields that contain sensitive information unset($fields['password'], $fields['authKey'], $fields['accessToken']); return $fields; }
/** * @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']); }