for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace rhertogh\Yii2Oauth2Server\models\traits;
use rhertogh\Yii2Oauth2Server\interfaces\models\base\Oauth2ActiveRecordInterface;
trait Oauth2UserIdentifierTrait
{
////////////////////////
/// Static Functions ///
/**
* @inheritDoc
*/
public static function findAllByUserId($userId)
return static::find()->where(['user_id' => $userId])->all();
}
/////////////////////////
/// Getters & Setters ///
public function getUserIdentifier()
return $this->user_id;
public function setUserIdentifier($identifier)
$this->user_id = $identifier;
user_id