1

I try to use CakeDC Users plugin version 6.0, with cakephp 3.5.12. I can use the basci routes, but I would like to redefine controller, because I wouldn't use registration functionality.

I added AppUsersController to src/Controller directory whit this code

namespace App\Controller;


use CakeDC\Users\Controller\Traits\LoginTrait;
use CakeDC\Users\Controller\Traits\RegisterTrait;

class AppUsersController extends AppController
{
    use LoginTrait;
    //use RegisterTrait;

}

And added this content to config/users.php

<?php
/**
 * Created by PhpStorm.
 * User: mihaly
 * Date: 2018.02.14.
 * Time: 12:46
 */

namespace App\Controller;


use CakeDC\Users\Controller\Traits\LoginTrait;
use CakeDC\Users\Controller\Traits\RegisterTrait;

class AppUsersController extends AppController
{
    use LoginTrait;
    //use RegisterTrait;

}

But the register actions are available in this way too. I tried comment booth traits, but the authentication functionality stay available. What I'm doing wrong?

I tried use this documentation: https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md

meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
  • 1
    Why not just set Users.Registration.active to false in the [plugin configuration](https://github.com/CakeDC/users/blob/master/Docs/Documentation/Configuration.md)? – Greg Schmidt Feb 16 '18 at 06:08

0 Answers0