I have a controller which process uploaded files by uploadify. The problem is that the Auth::check('default')
always return null. So I can't check if the user is logged in and authorized to upload.
class UploadController extends \app\controllers\AppController {
// this works perfect, the auth configuration is printed out
public function index() {
$auth = Auth::check('default');
print_r($auth);
}
// this doesnt work
public function uploadify() {
$auth = Auth::check('default');
print_r($auth); // always empty!
...
}
}
The uploadify
function is called via uploadify. I tried to trace the problem back but I ended in StaticObject::_filter
where the following if statement returns true:
if (!isset(static::$_methodFilters[$class][$method])) {...}
This differs from the call of index()
where the if-statement isn't executed. But I have no idea what's done there.