| @@ 907-916 (lines=10) @@ | ||
| 904 | * Determine whether accounts can be created |
|
| 905 | * @return bool |
|
| 906 | */ |
|
| 907 | public function canCreateAccounts() { |
|
| 908 | foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) { |
|
| 909 | switch ( $provider->accountCreationType() ) { |
|
| 910 | case PrimaryAuthenticationProvider::TYPE_CREATE: |
|
| 911 | case PrimaryAuthenticationProvider::TYPE_LINK: |
|
| 912 | return true; |
|
| 913 | } |
|
| 914 | } |
|
| 915 | return false; |
|
| 916 | } |
|
| 917 | ||
| 918 | /** |
|
| 919 | * Determine whether a particular account can be created |
|
| @@ 1766-1773 (lines=8) @@ | ||
| 1763 | * Determine whether accounts can be linked |
|
| 1764 | * @return bool |
|
| 1765 | */ |
|
| 1766 | public function canLinkAccounts() { |
|
| 1767 | foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) { |
|
| 1768 | if ( $provider->accountCreationType() === PrimaryAuthenticationProvider::TYPE_LINK ) { |
|
| 1769 | return true; |
|
| 1770 | } |
|
| 1771 | } |
|
| 1772 | return false; |
|
| 1773 | } |
|
| 1774 | ||
| 1775 | /** |
|
| 1776 | * Start an account linking flow |
|