removed cache and session factories. moved cache item management into cache class and out of drivers. tweaked auth class.

This commit is contained in:
Taylor Otwell
2011-07-09 22:15:42 -05:00
parent ceb0e1a807
commit ca58f80b22
7 changed files with 24 additions and 113 deletions

View File

@@ -40,11 +40,9 @@ class Auth {
throw new \Exception("You must specify a session driver before using the Auth class.");
}
$model = static::model();
if (is_null(static::$user) and Session::has(static::$key))
{
static::$user = $model::find(Session::get(static::$key));
static::$user = forward_static_call(array(static::model(), 'find'), Session::get(static::$key));
}
return static::$user;
@@ -61,9 +59,7 @@ class Auth {
*/
public static function login($username, $password)
{
$model = static::model();
$user = $model::where(Config::get('auth.username'), '=', $username)->first();
$model = forward_static_call(array(static::model(), 'where'), Config::get('auth.username'), '=', $username)->first();
if ( ! is_null($user))
{