HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/linde/wp-content/plugins/better-wp-security/core/lib/Password_Requirement.php
<?php

namespace iThemesSecurity\Lib;

interface Password_Requirement {
	/**
	 * Gets the reason code for the password requirement.
	 *
	 * @return string
	 */
	public function get_code(): string;

	/**
	 * Gets the module responsible for the password requirement.
	 *
	 * @return string
	 */
	public function get_module(): string;

	/**
	 * Gets the title for the password requirement.
	 *
	 * @return string
	 */
	public function get_title(): string;

	/**
	 * Gets the description for the password requirement.
	 *
	 * @return string
	 */
	public function get_description(): string;

	/**
	 * Checks if the user must change their password.
	 *
	 * @param \WP_User $user     The user object.
	 * @param array    $settings The selected settings.
	 *
	 * @return bool
	 */
	public function is_password_change_required( \WP_User $user, array $settings ): bool;

	/**
	 * Evaluates a password.
	 *
	 * @param string             $password The raw password.
	 * @param \WP_User|\stdClass $user     The user object. May be an \stdClass
	 *                                     if a user is being edited or created.
	 *
	 * @return mixed|\WP_Error The evaluation, or a WP_Error instance if the password could not be evaluated.
	 */
	public function evaluate( string $password, $user );

	/**
	 * Validates that a password is valid for the given user.
	 *
	 * @param mixed              $evaluation The password evaluation returned from {@see Password_Requirement::evaluate()}.
	 * @param \WP_User|\stdClass $user       The user object. May be an \stdClass
	 *                                       if a user is being edited or created.
	 * @param array              $settings   The selected settings.
	 * @param array              $args       Additional arguments describing the validation.
	 *
	 * @return bool|string Whether the password is valid for this user.
	 *                     Optionally return a message to display to the user in case it is invalid.
	 */
	public function validate( $evaluation, $user, array $settings, array $args );

	/**
	 * Gets the reason a user must change their password.
	 *
	 * @param mixed $evaluation The password evaluation returned from {@see Password_Requirement::evaluate()}.
	 * @param array $settings   The selected settings.
	 *
	 * @return string
	 */
	public function get_reason_message( $evaluation, array $settings ): string;

	/**
	 * Gets the meta key that should be used to store the password's evaluation.
	 *
	 * @return string
	 */
	public function get_meta_key(): string;

	/**
	 * Is the password requirement always enabled, or can it be disabled.
	 *
	 * @return bool
	 */
	public function is_always_enabled(): bool;

	/**
	 * Should passwords be evaluated even if the Password Requirement isn't enabled.
	 *
	 * @return bool
	 */
	public function should_evaluate_if_not_enabled(): bool;

	/**
	 * Gets the settings schema.
	 *
	 * @return array
	 */
	public function get_settings_schema(): array;

	/**
	 * Checks if this password requirement should have an associated user group.
	 *
	 * @return bool
	 */
	public function has_user_group(): bool;
}