Commit d59b3ad9 authored by Taylor Otwell's avatar Taylor Otwell

add check for session driver before using auth class.

parent 59123fdf
<?php namespace System;
if (Config::get('session.driver') == '')
{
throw new \Exception("You must specify a session driver before using the Auth class.");
}
class Auth {
/**
......@@ -35,11 +40,6 @@ class Auth {
*/
public static function user()
{
if (Config::get('session.driver') == '')
{
throw new \Exception("You must specify a session driver before using the Auth class.");
}
if (is_null(static::$user) and Session::has(static::$key))
{
static::$user = call_user_func(Config::get('auth.by_id'), Session::get(static::$key));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment