GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Protected Attributes | Private Attributes
GravityView_Edit_Entry_User_Registration Class Reference

GravityView Edit Entry - Sync User Registration (when using the GF User Registration Add-on) More...

Public Member Functions

 __construct (GravityView_Edit_Entry $loader)
 
 add_hooks ()
 Add hooks to trigger updating the user. More...
 
 generate_display_names ($profileuser)
 Generate an array of all the user display names possibilities. More...
 
 load ()
 
 match_current_display_name ($user_id)
 Calculate the user display name format. More...
 
 restore_display_name ($user_id=0, $config=array(), $entry=array(), $password= '')
 Restore the Display Name and roles of a user after being updated by Gravity Forms User Registration Addon. More...
 

Protected Attributes

 $loader
 

Private Attributes

 $_user_before_update = null
 

Detailed Description

GravityView Edit Entry - Sync User Registration (when using the GF User Registration Add-on)

Definition at line 20 of file class-edit-entry-user-registration.php.

Constructor & Destructor Documentation

__construct ( GravityView_Edit_Entry  $loader)

Definition at line 32 of file class-edit-entry-user-registration.php.

References $loader.

Member Function Documentation

add_hooks ( )

Add hooks to trigger updating the user.

Since
1.18
Runs Filter:
gravityview/edit_entry/user_registration/trigger_update Choose whether to update user information via User Registration add-on when an entry is updated?
Since
1.11
Parameters
boolean$booleanWhether to trigger update on user registration (default: true)

Definition at line 48 of file class-edit-entry-user-registration.php.

References $entry, $form, and match_current_display_name().

generate_display_names (   $profileuser)

Generate an array of all the user display names possibilities.

Since
1.15
Parameters
object$profileuserWP_User object
Returns
array List all the possible display names for a certain User object

Definition at line 184 of file class-edit-entry-user-registration.php.

Referenced by match_current_display_name().

load ( )
Since
1.11

Definition at line 39 of file class-edit-entry-user-registration.php.

match_current_display_name (   $user_id)

Calculate the user display name format.

Since
1.15
Parameters
int$user_idWP User ID
Returns
string Display name format as used inside Gravity Forms User Registration

Definition at line 157 of file class-edit-entry-user-registration.php.

References $format, and generate_display_names().

Referenced by add_hooks().

restore_display_name (   $user_id = 0,
  $config = array(),
  $entry = array(),
  $password = '' 
)

Restore the Display Name and roles of a user after being updated by Gravity Forms User Registration Addon.

See also
GFUser::update_user()
Parameters
int$user_idWP User ID that was updated by Gravity Forms User Registration Addon
array$configGravity Forms User Registration Addon form feed configuration
array$entryThe Gravity Forms entry that was just updated
string$passwordUser password
Returns
void
Runs Filter:
gravityview/edit_entry/restore_display_name Whether display names should be restored to before updating an entry. Otherwise, display names will be reset to the format specified in Gravity Forms User Registration "Update" feed
Since
1.14.4
Parameters
boolean$restore_display_nameRestore Display Name? Default: true

Don't restore display name:

  • either disabled,
  • or it is an Update feed (we only care about Create feed)
  • or we don't need as we found the correct format before updating user.
    Since
    1.14.4
    Modify the user data after updated by Gravity Forms User Registration but before restored by GravityView
    Since
    1.14
    Parameters
    WP_User$restored_userThe user with restored details about to be updated by wp_update_user()
    WP_User$user_before_updateThe user before being updated by Gravity Forms User Registration
    WP_User$user_after_updateThe user after being updated by Gravity Forms User Registration
    array$entryThe Gravity Forms entry that was just updated

Definition at line 218 of file class-edit-entry-user-registration.php.

References $entry.

Field Documentation

$_user_before_update = null
private

Definition at line 30 of file class-edit-entry-user-registration.php.

$loader
protected

Definition at line 25 of file class-edit-entry-user-registration.php.

Referenced by __construct().


The documentation for this class was generated from the following file: