Oth\’s Thoughts


othAuth 0.2 released

Posted in CakePHP by othy on May 12, 2006

UPDATE: Please download the package from the snippets here
In the menu:

  • Bug Fixes
  • Some Refractoring
  • New Features

The major new feature is CAKE_ADMIN routing support. That doesn't mean that the old version couldn't work with CAKE_ADMIN, but it was not automatic ( e.g redirections redirect to /controller/admin_action instead of /admin/controller/action ), you can also specify CAKE_ADMIN routing in the permission list of a group, previously you'de specify controller/admin_action, now you can specify admin/controller/action, admin/controller/*, or just admin if want to have access to all CAKE_ADMIN actions

Another important feature is a simplified method for accessing user/group/permission stored in the session, given the fact that othAuth uses a hashkey (the one you specify when you init the component). to get othAuth information you need to do something like:

$auth_sess_name = 'othAuth_'.$this->othAuth->hashkey;
$user_data = $_SESSION[$auth_sess_name];
$user_data is now an array, containing all the information related to the user logged in print_r($user_data); to get an overview of how it's stored
to get the user name, it should be something like $user_data['User']['name']
to get the group name $user_data['Group']['name'];

othAuth now includes a methods to simplify all this, a helper to be used in the view scope is available too: $othAuth->user('name') $othAuth->group('name') etc..

OthAuth For CakePHP

Posted in CakePHP by othy on March 18, 2006

I’ve made an Authentication Component for CakePHP
you can download it in the snippet page at CakeForge

Comments are welcome.

Cake!

Posted in CakePHP by othy on March 18, 2006

This framework simply rules! CakePHP

« Previous Page