Do you have CakeDC users plugin install problems? Here’s the solution. Currently, I am working on a CakePHP project. The project requires user management system for registration as well as capable to log in before they can access or perform some actions. Before I decide to develop my own system, I came across CakeDC Users plugin which has very good feedback from many CakePHP developers. On the flip side, new CakePHP developers struggle with this plugin when trying to install into their application.
Here is a simple and straight forward solution on how to install CakeDC users plugin. It is a step by step installation guide that I have used on my current project am working on. I hope you will be able to follow and get you going right away. I am working on a Windows XP environment using WAMP server. Also, I will be using cake console to create users table but I will not cover how to set up CakePHP console or shell. Setting up CakePHP console tutorial will be covered in the near future.
CakeDC Users Plugin Installation and Setting Up
- CakeDC Users plugin requires PHP 5.2+, CakePHP 2.X, CakeDC Search plugin, and CakeDC Utils plugin.
- Download CakeDC Users zip file from Github. The zip file is located at the right hand column.
- Create a ‘Users’ folder in your app plugin folder located at [project_name/app/Config/Plugin/[Users folder goes here]
- Unzip the CakeDC file and copy its contents into the Users folder created above.
- Download CakeDC Utils and CakeDC Search plugins. These are requirements for CakeDC users plugin.
- Create ‘Utils’ folder and ‘Search’ folder in your app plugin folder, [see step 2 above] at /project_name/app/Config/Plugin/
- Create users table using cake console.
- Open command prompt – Start->run->[type in 'cmd']
- Change directory to your app folder – cd [your drive]:\path-to-wamp-www\project_name\app
- Create users table, path-to-project\app>cake schema create users –plugin Users
- Follow/answer questions
- Done. CakeDC users table created.
CakeDC Users Plugin Routes and Loading
Open your application routes.php file and paste the following code
Open your application bootstrap.php file and load all the plugin
To open register page on yor browser, go to localhost/project_name/users/register.
To open login page on yor browser, go to localhost/project_name/users/login
That’s it for today. If you have given up before, I guarantee you that if you try this easy to follow CakeDC Users plugin installation guide, you will have your CakePHP up and running in no time. If you have any question or suggestion, feel free to address them.