Session: additional metadata passed back from auth plugins is passed through to client for optional further parsing
authorDan
Sat, 04 Apr 2009 22:35:44 -0400
changeset 895 d6b095673a47
parent 894 83d180d87f3c
child 896 ddecc53004ee
Session: additional metadata passed back from auth plugins is passed through to client for optional further parsing
includes/sessions.php
--- a/includes/sessions.php	Sat Apr 04 22:34:56 2009 -0400
+++ b/includes/sessions.php	Sat Apr 04 22:35:44 2009 -0400
@@ -4023,12 +4023,19 @@
           {
             if ( isset($result['mode']) && $result['mode'] === 'error' && isset($result['error']) )
             {
-              return array(
+              // Pass back any additional information from the error response
+              $append = $result;
+              unset($append['mode'], $append['error']);
+              
+              $return = array(
                 'mode' => 'login_failure',
                 'error_code' => $result['error'],
                 // Use this to provide a way to respawn the login box
                 'respawn_info' => $this->process_login_request(array('mode' => 'getkey'))
               );
+              
+              $return = array_merge($append, $return);
+              return $return;
             }
           }
         }