mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 01:04:16 +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(
|
||||
'title' => __('Forgot Password', __FILE__), // getModuleInfo title
|
||||
'summary' => __('Provides password reset/email capability for the Login process.', __FILE__), // getModuleInfo summary
|
||||
'version' => 103,
|
||||
'version' => 104,
|
||||
'permanent' => false,
|
||||
'permission' => 'page-view',
|
||||
);
|
||||
@@ -1034,7 +1034,7 @@ class ProcessForgotPassword extends Process implements ConfigurableModule {
|
||||
"name varchar(128) NOT NULL, " .
|
||||
"token char(32) NOT NULL, " .
|
||||
"ts INT unsigned NOT NULL, " .
|
||||
"ip varchar(15) NOT NULL, " .
|
||||
"ip varchar(45) NOT NULL, " .
|
||||
"KEY token (token), " .
|
||||
"KEY ts (ts), " .
|
||||
"KEY ip (ip) " .
|
||||
@@ -1053,6 +1053,15 @@ class ProcessForgotPassword extends Process implements ConfigurableModule {
|
||||
$database = $this->wire('database');
|
||||
$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
|
||||
|
Reference in New Issue
Block a user