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
Показать файл Открыть проект

Открытые методы

Метод Описание
__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.