mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11327] Move UCP remind functionality to a controller for password reset
PHPBB3-11327
This commit is contained in:
parent
9cb22f008d
commit
3f852a3233
7 changed files with 31 additions and 3 deletions
|
@ -27,6 +27,7 @@ imports:
|
||||||
- { resource: services_text_formatter.yml }
|
- { resource: services_text_formatter.yml }
|
||||||
- { resource: services_text_reparser.yml }
|
- { resource: services_text_reparser.yml }
|
||||||
- { resource: services_twig.yml }
|
- { resource: services_twig.yml }
|
||||||
|
- { resource: services_ucp.yml }
|
||||||
- { resource: services_user.yml }
|
- { resource: services_user.yml }
|
||||||
|
|
||||||
- { resource: tables.yml }
|
- { resource: tables.yml }
|
||||||
|
|
15
phpBB/config/default/container/services_ucp.yml
Normal file
15
phpBB/config/default/container/services_ucp.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
services:
|
||||||
|
phpbb.ucp.controller.reset_password:
|
||||||
|
class: phpbb\ucp\controller\reset_password
|
||||||
|
arguments:
|
||||||
|
- '@config'
|
||||||
|
- '@dbal.conn'
|
||||||
|
- '@dispatcher'
|
||||||
|
- '@controller.helper'
|
||||||
|
- '@language'
|
||||||
|
- '@passwords.manager'
|
||||||
|
- '@request'
|
||||||
|
- '@template'
|
||||||
|
- '@user'
|
||||||
|
- '%core.root_path%'
|
||||||
|
- '%core.php_ext%'
|
|
@ -26,3 +26,7 @@ phpbb_help_routing:
|
||||||
|
|
||||||
phpbb_report_routing:
|
phpbb_report_routing:
|
||||||
resource: report.yml
|
resource: report.yml
|
||||||
|
|
||||||
|
phpbb_ucp_routing:
|
||||||
|
resource: ucp.yml
|
||||||
|
prefix: /user
|
||||||
|
|
3
phpBB/config/default/routing/ucp.yml
Normal file
3
phpBB/config/default/routing/ucp.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
phpbb_ucp_reset_password_controller:
|
||||||
|
path: /reset_password
|
||||||
|
defaults: { _controller: phpbb.ucp.controller.reset_password:handle }
|
|
@ -2519,11 +2519,14 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||||
|
|
||||||
|
/** @var \phpbb\controller\helper $controller_helper */
|
||||||
|
$controller_helper = $phpbb_container->get('controller.helper');
|
||||||
|
|
||||||
$login_box_template_data = array(
|
$login_box_template_data = array(
|
||||||
'LOGIN_ERROR' => $err,
|
'LOGIN_ERROR' => $err,
|
||||||
'LOGIN_EXPLAIN' => $l_explain,
|
'LOGIN_EXPLAIN' => $l_explain,
|
||||||
|
|
||||||
'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
|
'U_SEND_PASSWORD' => ($config['email_enable']) ? $controller_helper->route('phpbb_ucp_reset_password_controller') : '',
|
||||||
'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
|
'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
|
||||||
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
|
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
|
||||||
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
||||||
|
|
|
@ -63,8 +63,10 @@ switch ($mode)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'sendpassword':
|
case 'sendpassword':
|
||||||
$module->load('ucp', 'remind');
|
/** @var \phpbb\controller\helper $controller_helper */
|
||||||
$module->display($user->lang['UCP_REMIND']);
|
$controller_helper = $phpbb_container->get('controller.helper');
|
||||||
|
|
||||||
|
redirect($controller_helper->route('phpbb_ucp_reset_password_controller'));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'register':
|
case 'register':
|
||||||
|
|
Loading…
Add table
Reference in a new issue