1. Go to this page and download the library: Download josegonzalez/cakephp-users library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Controller;
use Cake\Controller\Controller;
use Users\Controller\AuthTrait;
class AppController extends Controller
{
use AuthTrait;
public function initialize()
{
$this->loadAuthComponent();
}
}
return [
'Users' => [
// Name of the table to use
'userModel' => 'Users.Users',
// Enable users the ability to upload avatars
'enableAvatarUploads' => true,
// Enable the password-reset flow
'enablePasswordReset' => true,
// Require that a user's email be authenticated
'erFromSocialProfile',
'serviceConfig' => [
'provider' => [
'facebook' => [
'applicationId' => '<application id>',
'applicationSecret' => '<application secret>',
'scope' => [
'email'
]
],
],
],
],
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.