mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Merge PR #1209 branch 'dhruvgoel92/ticket/10325' into develop
# By Dhruv # Via Dhruv * dhruvgoel92/ticket/10325: [ticket/10325] move migration into a new file [ticket/10325] fix acp language [ticket/10325] use assert_response_success parts [ticket/10325] fix language in acp and ucp [ticket/10325] add assert_response_success in test [ticket/10325] functional tests for forgot password functionality [ticket/10325] add logout function in functional_test_case [ticket/10325] fix language in acp and ucp [ticket/10325] improve acp option language [ticket/10325] fix language key [ticket/10325] fix language variable [ticket/10325] change language var [ticket/10325] fix language [ticket/10325] add new config value to database [ticket/10325] trigger error if forgot password option disabled [ticket/10325] add allow forgot password option in acp
This commit is contained in:
@@ -398,6 +398,7 @@ class acp_board
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_SECURITY_SETTINGS',
|
||||
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_password_reset' => array('lang' => 'ALLOW_PASSWORD_RESET', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
||||
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
|
||||
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
28
phpBB/includes/db/migration/data/310/forgot_password.php
Normal file
28
phpBB/includes/db/migration/data/310/forgot_password.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package migration
|
||||
* @copyright (c) 2012 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_db_migration_data_310_forgot_password extends phpbb_db_migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return isset($this->config['allow_password_reset']);
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('phpbb_db_migration_data_30x_3_0_11');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.add', array('allow_password_reset', 1)),
|
||||
);
|
||||
}
|
||||
}
|
@@ -29,6 +29,11 @@ class ucp_remind
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
global $db, $user, $auth, $template;
|
||||
|
||||
if (!$config['allow_password_reset'])
|
||||
{
|
||||
trigger_error($user->lang('UCP_PASSWORD_RESET_DISABLED', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'));
|
||||
}
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
Reference in New Issue
Block a user