admin管理员组

文章数量:1026989

I just need to get real password (before encrypt) when user is registering. I need to save that password in another table. How I access the real password before encrypt?

The reason for it is, I am doing a research about passwords.

I just need to get real password (before encrypt) when user is registering. I need to save that password in another table. How I access the real password before encrypt?

The reason for it is, I am doing a research about passwords.

Share Improve this question asked Feb 21, 2017 at 2:54 NimalakaNimalaka 111 bronze badge 2
  • 2 This kind of research is usually done with password lists from known site breaks. Their size guarantees at least some statistical value. What you are trying is not research. Besides that, passwords are not encrypted in WordPress, they are hashed. Encryption is reversible, hashing is not. – fuxia Commented Feb 21, 2017 at 8:41
  • grrr, you could have just written "i want to collect emails and passwords" :( It is bad enough that you can get such lists, don't see any reason for us to encourage such a reckless behaviour – Mark Kaplun Commented Feb 21, 2017 at 8:44
Add a comment  | 

2 Answers 2

Reset to default 0

Not sure what research you are doing, but you can hook into user_register and get submitted password using $_POST variable.

You can hook into user_register to get the submitted password from the $_POST request:

add_action( 'user_register', 'myplugin_registration_save', 10, 1 );
function myplugin_registration_save( $user_id ) {

    if ( isset( $_POST['password'] ) ) {
       /* do something with $_POST['password'] */
    }

}

I just need to get real password (before encrypt) when user is registering. I need to save that password in another table. How I access the real password before encrypt?

The reason for it is, I am doing a research about passwords.

I just need to get real password (before encrypt) when user is registering. I need to save that password in another table. How I access the real password before encrypt?

The reason for it is, I am doing a research about passwords.

Share Improve this question asked Feb 21, 2017 at 2:54 NimalakaNimalaka 111 bronze badge 2
  • 2 This kind of research is usually done with password lists from known site breaks. Their size guarantees at least some statistical value. What you are trying is not research. Besides that, passwords are not encrypted in WordPress, they are hashed. Encryption is reversible, hashing is not. – fuxia Commented Feb 21, 2017 at 8:41
  • grrr, you could have just written "i want to collect emails and passwords" :( It is bad enough that you can get such lists, don't see any reason for us to encourage such a reckless behaviour – Mark Kaplun Commented Feb 21, 2017 at 8:44
Add a comment  | 

2 Answers 2

Reset to default 0

Not sure what research you are doing, but you can hook into user_register and get submitted password using $_POST variable.

You can hook into user_register to get the submitted password from the $_POST request:

add_action( 'user_register', 'myplugin_registration_save', 10, 1 );
function myplugin_registration_save( $user_id ) {

    if ( isset( $_POST['password'] ) ) {
       /* do something with $_POST['password'] */
    }

}

本文标签: securityHow to get real password (before encrypt) when register a user