mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 11:44:42 +02:00
Update ProcessForgotPassword for IPv6 address suppport
This commit is contained in:
@@ -43,7 +43,7 @@ class ProcessForgotPassword extends Process implements ConfigurableModule {
|
|||||||
return array(
|
return array(
|
||||||
'title' => __('Forgot Password', __FILE__), // getModuleInfo title
|
'title' => __('Forgot Password', __FILE__), // getModuleInfo title
|
||||||
'summary' => __('Provides password reset/email capability for the Login process.', __FILE__), // getModuleInfo summary
|
'summary' => __('Provides password reset/email capability for the Login process.', __FILE__), // getModuleInfo summary
|
||||||
'version' => 103,
|
'version' => 104,
|
||||||
'permanent' => false,
|
'permanent' => false,
|
||||||
'permission' => 'page-view',
|
'permission' => 'page-view',
|
||||||
);
|
);
|
||||||
@@ -1034,7 +1034,7 @@ class ProcessForgotPassword extends Process implements ConfigurableModule {
|
|||||||
"name varchar(128) NOT NULL, " .
|
"name varchar(128) NOT NULL, " .
|
||||||
"token char(32) NOT NULL, " .
|
"token char(32) NOT NULL, " .
|
||||||
"ts INT unsigned NOT NULL, " .
|
"ts INT unsigned NOT NULL, " .
|
||||||
"ip varchar(15) NOT NULL, " .
|
"ip varchar(45) NOT NULL, " .
|
||||||
"KEY token (token), " .
|
"KEY token (token), " .
|
||||||
"KEY ts (ts), " .
|
"KEY ts (ts), " .
|
||||||
"KEY ip (ip) " .
|
"KEY ip (ip) " .
|
||||||
@@ -1054,6 +1054,15 @@ class ProcessForgotPassword extends Process implements ConfigurableModule {
|
|||||||
$database->exec("DROP TABLE `" . self::table ."`");
|
$database->exec("DROP TABLE `" . self::table ."`");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ___upgrade($fromVersion, $toVersion) {
|
||||||
|
$database = $this->wire()->database;
|
||||||
|
$table = self::table;
|
||||||
|
if($fromVersion <= 103) {
|
||||||
|
$database->exec("ALTER TABLE `$table` MODIFY ip VARCHAR(45) NOT NULL");
|
||||||
|
$this->message("Added IPv6 address support");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module configuration
|
* Module configuration
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user