Skip to content

Commit

Permalink
Merge pull request #9 from hokoo/v1.1
Browse files Browse the repository at this point in the history
v1.1 interval and length settings got fixed
  • Loading branch information
hokoo authored Jul 17, 2024
2 parents 433b178 + 95ecddc commit 02c7cc6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion plugin-dir/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Donate link: https://www.paypal.me/igortron
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.0
Stable tag: 1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -50,5 +50,8 @@ Plugin development is on the [GitHub](https://github.com/hokoo/safety-passwords)


== Changelog ==
= 1.1 =
* Failing to set 0 as the password reset interval and 1 as the minimum password length fixed.

= 1.0 =
* Initial release
4 changes: 2 additions & 2 deletions plugin-dir/safety-passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Plugin Name: Safety Passwords
Description: Forces all users to have a strong password.
Network: true
Version: 1.0
Version: 1.1
Author: iTRON
License: GPL2
*/

namespace iTRON\SafetyPasswords;

const PLUGIN_SLUG = 'safety-passwords';
const VERSION = '1.0';
const VERSION = '1.1';

const PLUGIN_MAIN_FILE_PATH = __FILE__;
define( __NAMESPACE__ . '\PLUGIN_NAME', plugin_basename( __FILE__ ) );
Expand Down
4 changes: 2 additions & 2 deletions plugin-dir/src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function createOptions(): void {

if ( ! self::isOverloaded( 'min_len' ) ) {
$settings[] = Field::make( 'text', self::$optionPrefix . 'min_len', __("Password's minimum length", 'safety-passwords') )
->set_attribute( 'min', 8 )
->set_attribute( 'min', 1 )
->set_attribute( 'max', 24 )
->set_attribute( 'step', 1 )
->set_attribute( 'type', 'number' )
Expand All @@ -53,7 +53,7 @@ public static function createOptions(): void {

if ( ! self::isOverloaded( 'reset_interval' ) ) {
$settings[] = Field::make( 'text', self::$optionPrefix . 'reset_interval', __( 'Force Password Reset Interval (days)', 'safety-passwords' ) )
->set_attribute( 'min', 7 )
->set_attribute( 'min', 0 )
->set_attribute( 'max', 999 )
->set_attribute( 'step', 1 )
->set_attribute( 'type', 'number' )
Expand Down

0 comments on commit 02c7cc6

Please sign in to comment.