jmontoyaa 7 år sedan
förälder
incheckning
d843bbcd3b

+ 9 - 5
src/Chamilo/CoreBundle/EventListener/LoginSuccessHandler.php

@@ -24,8 +24,10 @@ class LoginSuccessHandler implements AuthenticationSuccessHandlerInterface
      * @param UrlGeneratorInterface $urlGenerator
      * @param AuthorizationChecker $checker
      */
-    public function __construct(UrlGeneratorInterface $urlGenerator, AuthorizationChecker $checker)
-    {
+    public function __construct(
+        UrlGeneratorInterface $urlGenerator,
+        AuthorizationChecker $checker
+    ) {
         $this->router = $urlGenerator;
         $this->checker = $checker;
     }
@@ -35,13 +37,15 @@ class LoginSuccessHandler implements AuthenticationSuccessHandlerInterface
      * @param TokenInterface $token
      * @return null|RedirectResponse|\Symfony\Component\Security\Http\Authentication\Response
      */
-    public function onAuthenticationSuccess(Request $request, TokenInterface $token)
-    {
+    public function onAuthenticationSuccess(
+        Request $request,
+        TokenInterface $token
+    ) {
         /** @var User $user */
         $user = $token->getUser();
         $userId = $user->getId();
         $session = $request->getSession();
-
+    dump($user->getId());
         $userInfo = api_get_user_info($user->getId());
         $userInfo['is_anonymous'] = false;
 

+ 3 - 1
src/Chamilo/SettingsBundle/Manager/SettingsManager.php

@@ -426,6 +426,7 @@ class SettingsManager implements SettingsManagerInterface
             'enable_profile_user_address_geolocalization' => 'User',
             'show_official_code_whoisonline' => 'User',
             'icons_mode_svg' => 'Tuning',
+            'user_name_order' => 'display',
             'user_name_sort_by' => 'display',
             'default_calendar_view' => 'agenda',
             'exercise_invisible_in_session' => 'exercise',
@@ -433,7 +434,8 @@ class SettingsManager implements SettingsManagerInterface
             'allow_download_documents_by_api_key' => 'Webservices',
             'ProfilingFilterAddingUsers' => 'profile',
             'donotlistcampus' => 'platform',
-            'gradebook_show_percentage_in_reports' => 'gradebook'
+            'gradebook_show_percentage_in_reports' => 'gradebook',
+
         ];
 
         return $oldItems;