|
@@ -1,6 +1,7 @@
|
|
|
<?php
|
|
<?php
|
|
|
App::uses('ModelBehavior', 'Model');
|
|
App::uses('ModelBehavior', 'Model');
|
|
|
App::uses('Security', 'Utility');
|
|
App::uses('Security', 'Utility');
|
|
|
|
|
+App::uses('PasswordHasherFactory', 'Shim.Controller/Component/Auth');
|
|
|
|
|
|
|
|
// @deprecated Use Configure settings instead.
|
|
// @deprecated Use Configure settings instead.
|
|
|
if (!defined('PWD_MIN_LENGTH')) {
|
|
if (!defined('PWD_MIN_LENGTH')) {
|
|
@@ -460,6 +461,8 @@ class PasswordableBehavior extends ModelBehavior {
|
|
|
* @return PasswordHasher
|
|
* @return PasswordHasher
|
|
|
*/
|
|
*/
|
|
|
protected function _getPasswordHasher($hasher) {
|
|
protected function _getPasswordHasher($hasher) {
|
|
|
|
|
+ return PasswordHasherFactory::build($hasher);
|
|
|
|
|
+
|
|
|
$class = $hasher;
|
|
$class = $hasher;
|
|
|
$config = [];
|
|
$config = [];
|
|
|
if (is_array($hasher)) {
|
|
if (is_array($hasher)) {
|