Skip to content
No description or website provided.
Find file
Latest commit 18705ad Oct 24, 2008 @mcurry Initial Revision
Failed to load latest commit information.
README Initial Revision Oct 24, 2008
user.php Initial Revision Oct 24, 2008


 * Static methods that can be used to retrieve the logged in user
 * from anywhere
 * Copyright (c) 2008 Matt Curry
 * @author      Matt Curry <>
 * @license     MIT

/* Description */
A snippet of code that can be dropped into your User model, which will allow you to access the
logged in user from anywhere in a CakePHP app.

/* Notes */
This code assumes you are using the core Auth component.

/* Instructions */
1) Paste the code into your User model.

2) In your AppController::beforeFilter add:
App::import('Model', 'User');

/* Usage */
Something went wrong with that request. Please try again.