/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakedc/users/src/Loader
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakedc/users/src/Loader/LoginComponentLoader.php (3115B)
'CakeDC/Users.Login',
'defaultMessage' => __d('cake_d_c/users', 'Username or password is incorrect'),
'messages' => [
'FAILURE_INVALID_RECAPTCHA' => __d('cake_d_c/users', 'Invalid reCaptcha'),
],
'targetAuthenticator' => 'CakeDC\Auth\Authenticator\FormAuthenticator',
];
return self::createComponent($controller, 'Auth.FormLoginFailure', $config);
}
/**
* Load the login component for social login
*
* @param \Cake\Controller\Controller $controller Target controller
* @return \CakeDC\Users\Controller\Component\LoginComponent|\Cake\Controller\Component
* @throws \Exception
*/
public static function forSocial($controller)
{
$config = [
'component' => 'CakeDC/Users.Login',
'defaultMessage' => __d('cake_d_c/users', 'Could not proceed with social account. Please try again'),
'messages' => [
'FAILURE_USER_NOT_ACTIVE' => __d(
'cake_d_c/users',
'Your user has not been validated yet. Please check your inbox for instructions'
),
'FAILURE_ACCOUNT_NOT_ACTIVE' => __d(
'cake_d_c/users',
'Your social account has not been validated yet. Please check your inbox for instructions'
),
],
'targetAuthenticator' => 'CakeDC\Users\Authenticator\SocialAuthenticator',
];
return self::createComponent($controller, 'Auth.SocialLoginFailure', $config);
}
/**
* Create the component using base $config and the one from $key
*
* @param \Cake\Controller\Controller $controller Target controller
* @param string $key configuration key
* @param array $config base configuration
*
* @return \CakeDC\Users\Controller\Component\LoginComponent|\Cake\Controller\Component
* @throws \Exception
*/
protected static function createComponent($controller, $key, array $config)
{
$custom = (array)Configure::read($key);
$config = Hash::merge($config, $custom);
return $controller->loadComponent($config['component'], $config);
}
}