User.php 254 B

1234567891011
  1. <?php
  2. namespace app\models;
  3. class User extends \dektrium\user\models\User implements \yii\web\IdentityInterface
  4. {
  5. public static function findByUsername($username)
  6. {
  7. return self::find()->andWhere(['username'=>$username])->one();
  8. }
  9. }