diff --git a/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module b/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module index c77f43ee..b9578eea 100644 --- a/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module +++ b/wire/modules/Process/ProcessForgotPassword/ProcessForgotPassword.module @@ -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