+ $action = $params['requestsfor'];
+
+ $preservedReq = $helper->getPreservedRequest();
+ if ( $preservedReq ) {
+ $ret += [
+ 'haspreservedstate' => $preservedReq->hasStateForAction( $action ),
+ 'hasprimarypreservedstate' => $preservedReq->hasPrimaryStateForAction( $action ),
+ 'preservedusername' => (string)$preservedReq->username,
+ ];
+ } else {
+ $ret += [
+ 'haspreservedstate' => false,
+ 'hasprimarypreservedstate' => false,
+ 'preservedusername' => '',
+ ];
+ }
+
+ $reqs = $manager->getAuthenticationRequests( $action, $this->getUser() );