Parcourir la source

Fixing getUser exception.

Julio Montoya il y a 11 ans
Parent
commit
e1efbb310b
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/ChamiloLMS/Controller/BaseController.php

+ 2 - 2
src/ChamiloLMS/Controller/BaseController.php

@@ -130,11 +130,11 @@ abstract class BaseController extends FlintController
      */
     public function getUser()
     {
-        if (!$this->has('security.context')) {
+        if (!$this->has('security')) {
             throw new \LogicException('The SecurityServiceProvider is not registered in your application.');
         }
 
-        if (null === $token = $this->get('security.context')->getToken()) {
+        if (null === $token = $this->get('security')->getToken()) {
             return null;
         }