Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_hash_password [ WordPress Function ]

wp_hash_password ( $password )
Parameters:
  • (string) $password Plain text user password to hash
Uses:
  • PasswordHash::HashPassword
Returns:
  • (string) The hash string of the password
Defined at:



Create a hash (encrypt) of a plain text password.

For integration with other applications, this function can be overwritten to instead use the other package password checking algorithm.

Source


<?php
function wp_hash_password($password) {
    global 
$wp_hasher;

    if ( empty(
$wp_hasher) ) {
        require_once( 
ABSPATH 'wp-includes/class-phpass.php');
        
// By default, use the portable hash from phpass
        
$wp_hasher = new PasswordHash(8true);
    }

    return 
$wp_hasher->HashPassword($password);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics