|
@@ 862-878 (lines=17) @@
|
| 859 |
|
* |
| 860 |
|
* @return string Returns the "lost password" page as HTML code. |
| 861 |
|
*/ |
| 862 |
|
public function lostpassword() |
| 863 |
|
{ |
| 864 |
|
$handlers = []; |
| 865 |
|
$authenticators = $this->getApplicableAuthenticators(Authenticator::RESET_PASSWORD); |
| 866 |
|
/** @var Authenticator $authenticator */ |
| 867 |
|
foreach ($authenticators as $authenticator) { |
| 868 |
|
$handlers[] = $authenticator->getLostPasswordHandler( |
| 869 |
|
Controller::join_links($this->Link(), 'lostpassword') |
| 870 |
|
); |
| 871 |
|
} |
| 872 |
|
|
| 873 |
|
return $this->delegateToMultipleHandlers( |
| 874 |
|
$handlers, |
| 875 |
|
_t('SilverStripe\\Security\\Security.LOSTPASSWORDHEADER', 'Lost Password'), |
| 876 |
|
$this->getTemplatesFor('lostpassword') |
| 877 |
|
); |
| 878 |
|
} |
| 879 |
|
|
| 880 |
|
/** |
| 881 |
|
* Show the "change password" page. |
|
@@ 892-906 (lines=15) @@
|
| 889 |
|
* |
| 890 |
|
* @return string|HTTPRequest Returns the "change password" page as HTML code, or a redirect response |
| 891 |
|
*/ |
| 892 |
|
public function changepassword() |
| 893 |
|
{ |
| 894 |
|
/** @var array|Authenticator[] $authenticators */ |
| 895 |
|
$authenticators = $this->getApplicableAuthenticators(Authenticator::CHANGE_PASSWORD); |
| 896 |
|
$handlers = []; |
| 897 |
|
foreach ($authenticators as $authenticator) { |
| 898 |
|
$handlers[] = $authenticator->getChangePasswordHandler($this->Link('changepassword')); |
| 899 |
|
} |
| 900 |
|
|
| 901 |
|
return $this->delegateToMultipleHandlers( |
| 902 |
|
$handlers, |
| 903 |
|
_t('SilverStripe\\Security\\Security.CHANGEPASSWORDHEADER', 'Change your password'), |
| 904 |
|
$this->getTemplatesFor('changepassword') |
| 905 |
|
); |
| 906 |
|
} |
| 907 |
|
|
| 908 |
|
/** |
| 909 |
|
* Create a link to the password reset form. |