Linux 软件免费装
Banner图

WP Password Generator

开发者 stevegrunwell
VanPattenMedia
更新时间 2017年3月6日 00:37
捐献地址: 去捐款
PHP版本: 4.2 及以上
WordPress版本: 4.3
版权: GPLv2 or later

标签

users password password generator pluggable wp_generate_password

下载

1.0 2.8.1 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.7.1 2.8 1.1

详情介绍:

Notice: With the native password generation features being introduced in WordPress 4.3 this plugin is no longer necessary to generate strong passwords. You can read more about the plugin sunsetting on the developer's blog. When administrators create new users through the WordPress admin interface (wp-admin/user-new.php), they are forced to come up with a password for the new user. The administrator is faced with a choice: use a separate password generator app or waste precious time coming up with a clever password only one person will ever see. WP Password Generator takes the hassle out of creating new user passwords. Simply click "Generate Password" and your user has a unique, 7-16 character password. The password generator function is also totally pluggable, so you can easily change the way passwords are generated in order to meet your standards. Please note that this plugin does require JavaScript to be enabled in order to work. Without JavaScript, the generator will simply be unavailable.

安装:

  1. Upload the '/wp-password-generator/' plugin directory to '/wp-content/plugins'
  2. Activate the plugin
  3. That's it!

屏幕截图:

  • The "Generate Password" button just above the strength indicator in /wp-admin/user-new.php with the new 'Show password' link beside it
  • A generated password revealed by the user clicking 'Show password'. This password will update with subsequent generations.

升级注意事项:

2.7 Tested with WordPress 4.0, added Russian, Serbian, and Portuguese translations. 2.6 Fixed bug where a "0" was always being appended to generated passwords. Password generator arguments can now be controlled via the wp_password_generator_args filter. Added Dutch translation. 2.5 Password generator will now appear on user profile and edit screens. Added Spanish localization. 2.4 Added i18n support. Refactored jQuery scripting to be more future-proof. 2.3 Plugin will now work in WordPress installations where wp-content/ has a different name or location. Scripting has been updated to work with newer versions of jQuery - version 2.3 is not suitable for WordPress versions below 3.2 2.2 Password generation is now handled by the wp_generate_password() pluggable function so that both generated and "Lost password" requests are handled by the same function. 2.1 Ability to view generated passwords before submitting form. Only auto-check the 'Send password' option upon first generation. 2.0 The password strength indicator is now updated when a password is generated. Better support for non-standard WordPress instances. Removed generator from user-edit screen. 1.1 Generated passwords now vary between 7 and 16 characters in length, rather than the eight-character limit of version 1.0

常见问题:

How does the plugin generate passwords?

WP Password Generator un-obtrusively injects a "Generate Password" button into /wp-admin/user-new.php. When the button is clicked, an Ajax call is fired off to /wp-content/plugins/wp-password-generator/wp-password-generator.php, which returns a randomly-generated password. As of version 2.2, WP Password Generator calls the pluggable wp_generate_password() function (which is the same function WordPress uses to create new passwords for users who have clicked "Forgot password?"). This function can be overridden in a theme or plugin, if desired (see "Can I change the way my passwords are generated?" below).

Is there anything to configure?

Not directly, but as of version 2.2 the plugin uses the pluggable wp_generate_password() function. If a developer chooses to override the function, the passwords created by the plugin will use the same methods and rules applied to passwords created through the "Forgot password?" tool. Minimum and maximum password lengths can also be set in the wp_options table (one row with the key of wp-password-generator-opts), though there is no dedicated settings page for these values (by default, passwords are between 7-16 characters) and they should suffice for 99% of users.

Can I change the way my passwords are generated?

Since version 2.2 WP Password Generator has used the pluggable function wp_generate_password() to handle the actual generation of passwords. This switch a) kept the codebase more DRY and b) allows users to easily override the generator logic without editing core or plugin files. The default generator looks something like this and can be found in wp-includes/pluggable.php (line 1478 in core version 3.3.2): if ( !function_exists('wp_generate_password') ) : / * Generates a random password drawn from the defined set of characters. * * @since 2.5 * * @param int $length The length of password to generate * @param bool $special_chars Whether to include standard special characters. Default true. * @param bool $extra_special_chars Whether to include other special characters. Used when * generating secret keys and salts. Default false. * @return string The random password / function wp_generate_password( $length = 12, $special_chars = true, $extra_special_chars = false ) { $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; if ( $special_chars ) $chars .= '!@#$%^&*()'; if ( $extra_special_chars ) $chars .= '-_ []{}<>~`+=,.;:/?|'; $password = ''; for ( $i = 0; $i < $length; $i++ ) { $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1); } // random_password filter was previously in random_password function which was deprecated return apply_filters('random_password', $password); } endif; To overwrite the default behavior, simply create a function named wp_generate_password() in your theme's functions.php file. WordPress will then substitute your theme's wp_generate_password() for the default. You can also adjust the arguments passed to wp_generate_password() via the wp_password_generator_args filter. For example, you could require 16 character passwords with the following: /* * Set the length of generated passwords from WP Password Generator to 16 characters * * @param array $args Default arguments * @return array / function mysite_set_password_requirements( $args ) { $args['length'] = 16; return $args; } add_action( 'wp_password_generator_args', 'mysite_set_password_requirements' );

Can I use WP Password Generator to change existing users' passwords?

As of version 2.5 the "Generate Password" button has been added to the profile/user edit pages.

Does the plugin work with WordPress Multisite?

WordPress Multisite already generates random passwords for new Multisite users so WP Password Generator isn't necessary in Multisite installations.

更新日志:

2.8 2.7.1 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.1 1.0