mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
New interface for varied social login configuration fields
Uses the new e_user_provider::getFieldsOf() API
This commit is contained in:
@@ -1260,6 +1260,21 @@ class e_user_provider
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get standard and supplementary fields of the specified provider
|
||||
* @param $providerName string Name of the supported social login provider
|
||||
* @return array Multidimensional associative array where the keys are the known field names and the values are a
|
||||
* description of what their key is for. Keys can be nested in parent keys. Parent keys will not
|
||||
* have a description of the key. All fields take a string value. Return will be empty if the
|
||||
* specified provider does not have any known fields.
|
||||
*/
|
||||
public static function getFieldsOf($providerName)
|
||||
{
|
||||
$standardFields = self::getStandardFieldsOf($providerName);
|
||||
$supplementaryFields = self::getSupplementalFieldsOf($providerName);
|
||||
return self::array_merge_recursive_distinct($standardFields, $supplementaryFields);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the standard/common/parent fields of the specified provider
|
||||
* @param $providerName string Name of the supported social login provider
|
||||
@@ -1362,7 +1377,7 @@ class e_user_provider
|
||||
{
|
||||
if (!isset($adapterTokens[$index][1]))
|
||||
{
|
||||
if (in_array($adapterTokens[$index], [';', '.', ','])) return $carry;
|
||||
if (in_array($adapterTokens[$index], [';', '.', ',', '?'])) return $carry;
|
||||
++$index;
|
||||
return self::adapterTokenParseConfig($adapterTokens, $index, $carry);
|
||||
}
|
||||
|
Reference in New Issue
Block a user