added views and Authclients
This commit is contained in:
27
lib/User/AuthClient/GitHub.php
Normal file
27
lib/User/AuthClient/GitHub.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Da\User\AuthClient;
|
||||
|
||||
use Da\User\Contracts\AuthClientInterface;
|
||||
|
||||
class GitHub extends \yii\authclient\clients\GitHub implements AuthClientInterface
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return isset($this->getUserAttributes()['email'])
|
||||
? $this->getUserAttributes()['email']
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
return isset($this->getUserAttributes()['login'])
|
||||
? $this->getUserAttributes()['login']
|
||||
: null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user