Timeline for Pass variable to hook. Its possible?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
|
|
Nov 1, 2011 at 13:36 | vote | accept | chifliiiii | ||
Sep 15, 2011 at 16:31 | answer | added | chifliiiii | timeline score: 1 | |
Sep 14, 2011 at 22:07 | comment | added | Rarst | You have got couple very valid suggestions in your other question. Please try to go through those, before dragging this one out. | |
Sep 14, 2011 at 22:02 | comment | added | chifliiiii | Ok i can pass variables to hook but i was doing it wrong. Code should be: function encrypt_password_function($pass, $id){ global $wpdb; $encrypted=sha1($pass); $wpdb->query($wpdb->prepare("UPDATE wp_users SET iphone_pass = %s WHERE ID = %d",array($encrypted, '10'))); } function encrypt_password($var1, $var2) { do_action('encrypt_password',$var1,$var2); } add_action('encrypt_password', 'encrypt_password_function', 1,2); | |
Sep 14, 2011 at 22:02 | comment | added | chifliiiii | I cant find any other way to get plain password when user register or update his password :( | |
Sep 14, 2011 at 22:00 | comment | added | Rarst | Are you modifying core file to run this? Just don't. I won't even go there. :) | |
Sep 14, 2011 at 21:59 | comment | added | chifliiiii | ok now i realized i was doing wrong the add_action. But now the pass is hashed and nto plain like it says on the function description :( | |
Sep 14, 2011 at 21:22 | comment | added | chifliiiii | Im calling in wp-includes/user.php inside wp_insert_user function like these: encrypt_password($plain_password, $user_id); I get the plain password var before password get hashed. | |
Sep 14, 2011 at 15:38 | comment | added | Rarst |
How and where are you calling these functions? encrypt_password() without any arguments and with hook inside doesn't make sense.
|
|
Sep 14, 2011 at 15:14 | history | asked | chifliiiii | CC BY-SA 3.0 |