phpcakephppluginscakephp-3.0cakedc

How to extend Cakedc Users plugin to use own table in Cakephp 3


I want to extend users plugin so that i can remove username field and customize my table according to needs. I have seen the github documentation for extending plugin but that doesn't help me much. I tried to extend UserTable.php but it gives me error Unknown method "register". Please suggest best way or simple code.


Solution

  • Check this cloud9 environment created specifically to show how to extend the model and table as an example: https://ide.c9.io/steinkel/users-example-custom-table

    Basically changes done to use a custom table are:

    And you are done :)