Bazet User Management Plugin
I wrote this simple user management plugin for CakePHP 1.2.5 to ease my daily job as CakePHP Developer.
Demo
For normal user demo, please signup first. Please login as "admin" and password "admin" to test the user administration functionsFeatures
- User signup
- User login
- User logout
- User change profile
- User forgot password
- Administration via Scaffold
Installations ( this sample app )
- Download cakephp_projects.zip and extract it into your htdocs folder ( eg c:\xampp\htdocs\)
- Execute bazet.sql in /cakephp_projects/imz/bazet.sql
- Change your /cakephp_projects/imz/config/database.php to suite your configuration
- Change to your Cake Path in /cakephp_projects/imz/webroot/index.php
/** * The absolute path to the "cake" directory, WITHOUT a trailing DS. * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', 'C:\xampp\htdocs\cake_projects'); } - Open http://localhost/cake_projects/imz
Installations ( plugin only )
- Download bazet.zip and extract it under your /app/plugins/
- Run the bazet.sql schema into your MySQL using phpMyAdmin. Will create 2 tables, bazet__users and bazet__tickets
-
Modify your app_controller.php and add these lines :
# /app/app_controller.php class AppController extends Controller { var $components = array('Auth','Session'); function beforeFilter() { require(APP.'plugins'.DS.'bazet'.DS.'app_controller'.DS.'before_filter.php'); } function beforeRender() { require(APP.'plugins'.DS.'bazet'.DS.'app_controller'.DS.'before_render.php'); } function isAuthorized(){ return require(APP.'plugins'.DS.'bazet'.DS.'app_controller'.DS.'is_authorized.php');; } } // eo App -
In /app/config/routes.php, add this line to the bottom of the file,
# Bazet Plugin Startup require(APP.'plugins'.DS.'bazet'.DS.'config'.DS.'routes.php
-
And lastly, add the navigation element from the plugin into your /app/views/layouts/default.ctp
echo $this->element('navigation', array('plugin' => 'bazet'));
