| @@ 853-862 (lines=10) @@ | ||
| 850 | * Determine whether accounts can be created |
|
| 851 | * @return bool |
|
| 852 | */ |
|
| 853 | public function canCreateAccounts() { |
|
| 854 | foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) { |
|
| 855 | switch ( $provider->accountCreationType() ) { |
|
| 856 | case PrimaryAuthenticationProvider::TYPE_CREATE: |
|
| 857 | case PrimaryAuthenticationProvider::TYPE_LINK: |
|
| 858 | return true; |
|
| 859 | } |
|
| 860 | } |
|
| 861 | return false; |
|
| 862 | } |
|
| 863 | ||
| 864 | /** |
|
| 865 | * Determine whether a particular account can be created |
|
| @@ 1713-1720 (lines=8) @@ | ||
| 1710 | * Determine whether accounts can be linked |
|
| 1711 | * @return bool |
|
| 1712 | */ |
|
| 1713 | public function canLinkAccounts() { |
|
| 1714 | foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) { |
|
| 1715 | if ( $provider->accountCreationType() === PrimaryAuthenticationProvider::TYPE_LINK ) { |
|
| 1716 | return true; |
|
| 1717 | } |
|
| 1718 | } |
|
| 1719 | return false; |
|
| 1720 | } |
|
| 1721 | ||
| 1722 | /** |
|
| 1723 | * Start an account linking flow |
|