+
+ /**
+ * Processes login_extra_fields config, transforming an '=' separated array of strings
+ * into a key/value array.
+ *
+ * @param array|mixed $extraFieldsStrings
+ *
+ * @return array
+ */
+ protected function processExtraFields($extraFieldsStrings)
+ {
+ if (!is_array($extraFieldsStrings)) {
+ return [];
+ }
+
+ $extraFields = [];
+ foreach ($extraFieldsStrings as $extraField) {
+ if (strpos($extraField, '=') === false) {
+ continue;
+ }
+ list($fieldName, $fieldValue) = explode('=', $extraField, 2);
+ $extraFields[$fieldName] = $fieldValue;
+ }
+
+ return $extraFields;
+ }