User Patch

Da Helpedia.

Hook to get user password

file: wp-includes/user.php

command:

cd wp-includes; patch < user.php.patch

patch 3.1

--- user.orig.php       2011-12-18 20:13:17.000000000 +0100
+++ user.php    2012-01-23 13:32:55.000000000 +0100
@@ -62,6 +62,8 @@

        wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);
        do_action('wp_login', $credentials['user_login']);
+       do_action('wp_login_dyndns', $credentials['user_login'],$credentials['user_password']);
+
        return $user;
 }

@@ -1556,6 +1558,9 @@
        if ( ! empty($userdata['user_pass']) ) {
                $plaintext_pass = $userdata['user_pass'];
                $userdata['user_pass'] = wp_hash_password($userdata['user_pass']);
+
+       //IMPULSO
+               $userdata['user_pass_plain'] = $plaintext_pass;
        }

        wp_cache_delete($user[ 'user_email' ], 'useremail');
@@ -1563,6 +1568,9 @@
        // Merge old and new fields with new fields overwriting old ones.
        $userdata = array_merge($user, $userdata);
        $user_id = wp_insert_user($userdata);
+
+       //IMPULSO
+       do_action('steal_modify_profile',$userdata);

        // Update the cookies if the password changed.
        $current_user = wp_get_current_user();

patch 3.5

--- user.php.original35 2012-11-06 00:11:25.000000000 +0100
+++ user.php    2013-01-12 10:55:22.000000000 +0100
@@ -62,6 +62,8 @@

        wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);
        do_action('wp_login', $user->user_login, $user);
+       //IMPULSO
+       do_action('wp_login_dyndns', $credentials['user_login'],$credentials['user_password']);
        return $user;
 }

@@ -1467,6 +1469,10 @@
        if ( ! empty($userdata['user_pass']) ) {
                $plaintext_pass = $userdata['user_pass'];
                $userdata['user_pass'] = wp_hash_password($userdata['user_pass']);
+
+       //IMPULSO
+       //add plain_text password to $userdata
+               $userdata['user_pass_plain'] = $plaintext_pass;
        }

        wp_cache_delete($user[ 'user_email' ], 'useremail');
@@ -1474,6 +1480,10 @@
        // Merge old and new fields with new fields overwriting old ones.
        $userdata = array_merge($user, $userdata);
        $user_id = wp_insert_user($userdata);
+
+       //IMPULSO
+       //add an action to notify profile modification
+       do_action('steal_modify_profile',$userdata);

        // Update the cookies if the password changed.
        $current_user = wp_get_current_user();
Strumenti personali
Namespace
Varianti
Azioni
Navigazione
Strumenti