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
2 Answers
Reset to default 0Not 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
2 Answers
Reset to default 0Not 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
版权声明:本文标题:security - How to get real password (before encrypt) when register a user? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745662392a2161970.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论