Skip to content

Commit

Permalink
Don't have WP update the password
Browse files Browse the repository at this point in the history
  • Loading branch information
zackkatz committed Sep 17, 2015
1 parent 07b4f62 commit f938752
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: GravityView
* Plugin URI: http://gravityview.co
* Description: Create directories based on a Gravity Forms form, insert them using a shortcode, and modify how they output.
* Version: 1.14.2
* Version: 1.14.3
* Author: Katz Web Services, Inc.
* Author URI: http://www.katzwebservices.com
* Text Domain: gravityview
Expand Down Expand Up @@ -89,7 +89,7 @@
*/
final class GravityView_Plugin {

const version = '1.14.2';
const version = '1.14.3';

private static $instance;

Expand Down
4 changes: 2 additions & 2 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ public function changelog_screen() {

<hr />

<h3>1.14.2 on September 16</h3>
<h3>1.14.2 &amp; 1.14.3 on September 17</h3>
<ul>
<li>Fixed: Issue affecting Gravity Forms User Registration Addon. Passwords were being reset when editing an entry.</li>
<li>Fixed: Issue affecting Gravity Forms User Registration Addon. Passwords were being reset when an user edited their own entry.</li>
</ul>

<h3>1.14.1 on September 16</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,15 @@ public function update_user( $form = array(), $entry_id = 0 ) {
* @param int $user_id WP User ID that was updated by Gravity Forms User Registration Addon
* @param array $config Gravity Forms User Registration Addon form feed configuration
* @param array $entry The Gravity Forms entry that was just updated
* @param string $password User password
* @return void
*/
public function restore_user_details( $user_id = 0, $config = array(), $entry = array(), $password = '' ) {
public function restore_user_details( $user_id = 0, $config = array(), $entry = array() ) {

$user_after_update = get_userdata( $user_id );

$restored_user = $user_after_update;

// Restore the password
$restored_user->user_pass = $password;

// Restore previous display_name
// Restore previous display_name
$restored_user->display_name = $this->_user_before_update->display_name;

// Restore previous roles
Expand All @@ -130,6 +126,9 @@ public function restore_user_details( $user_id = 0, $config = array(), $entry =
$restored_user->add_role( $role );
}

// Don't have WP update the password.
unset( $restored_user->data->user_pass );

/**
* Modify the user data after updated by Gravity Forms User Registration but before restored by GravityView
* @since 1.14
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Beautifully display your Gravity Forms entries. Learn more on [gravityview.co](h

== Changelog ==

= 1.14.2 on September 17 =
* Fixed: Issue affecting Gravity Forms User Registration Addon. Passwords were being reset when editing an entry.
= 1.14.2 & 1.14.3 on September 17 =
* Fixed: Issue affecting Gravity Forms User Registration Addon. Passwords were being reset when an user edited their own entry.

= 1.14.1 on September 16 =
* Fixed: Error with older versions of Maps Premium View
Expand Down

0 comments on commit f938752

Please sign in to comment.