1
0

UserController.php 451 B

1234567891011121314151617181920
  1. <?php
  2. namespace api\modules\v1\controllers;
  3. use yii\rest\ActiveController;
  4. use yii\helpers\ArrayHelper;
  5. use yii\filters\auth\QueryParamAuth;
  6. class UserController extends ActiveController
  7. {
  8. public $modelClass = 'api\models\User';
  9. public function behaviors() {
  10. return ArrayHelper::merge (parent::behaviors(), [
  11. 'authenticator' => [
  12. 'class' => QueryParamAuth::className()
  13. ]
  14. ] );
  15. }
  16. }