PHP 클래스 FOC\Authenticate\Auth\MultiColumnAuthenticate

Provides the ability to authenticate using POST data. The username form input can be checked against multiple table columns, for instance username and email $this->Auth->config('authenticate', [ 'Authenticate.MultiColumn' => [ 'fields' => [ 'username' => 'username', 'password' => 'password' ], 'columns' => ['username', 'email'], 'userModel' => 'Users', 'scope' => ['User.active' => 1] ] ]); Licensed under The MIT License For full copyright and license information, please see the LICENSE.txt
상속: extends Cake\Auth\FormAuthenticate
파일 보기 프로젝트 열기: friendsofcake/authenticate

공개 메소드들

메소드 설명
__construct ( Cake\Controller\ComponentRegistry $registry, array $config ) Constructor

보호된 메소드들

메소드 설명
_findUser ( string $username, string $password = null ) : boolean | array Find a user record using the standard options.

메소드 상세

__construct() 공개 메소드

Besides the keys specified in BaseAuthenticate::$_defaultConfig, MultiColumnAuthenticate uses the following extra keys: - 'columns' Array of columns to check username form input against
public __construct ( Cake\Controller\ComponentRegistry $registry, array $config )
$registry Cake\Controller\ComponentRegistry The Component registry used on this request.
$config array Array of config to use.

_findUser() 보호된 메소드

Find a user record using the standard options.
protected _findUser ( string $username, string $password = null ) : boolean | array
$username string The username/identifier.
$password string The password, if not provide password checking is skipped and result of find is returned.
리턴 boolean | array Either false on failure, or an array of user data.