This site is automated with JetFlow.io plugin and protected with WP Cerber security plugin

Newsletter Subscription

If you want to subscribe to our monthly newsletter, please submit the form below.

 

Variable {USER}

jetFlow.io > Documentation  > Variables and patterns  > Variable {USER}

Variable {USER}

Filled with the information pertaining to the currently logged in WordPress user

For instance, to send an email to the current user use pattern {USER[user_email]} to get an email address and {USER[display_name]} as a name of a recipient.

Or, you can stop the execution of workflow conditionally if user does not have capability to upload files. To get this use variable pattern {USER[allcaps][upload_files]} with control action Stop if.

Example of full structure of USER list variable fields:

    [ID] => 2
    [user_login] => john
    [user_pass] => 
    [user_nicename] =>  John
    [user_email] => john@wpcerber.com
    [user_url] => http://wpcerber.com
    [user_registered] => 2014-12-22 20:51:53
    [user_activation_key] => 
    [user_status] => 0
    [display_name] => John Coltrane
    [nickname] => John
    [first_name] => John
    [last_name] => Coltrane
    [description] => John William Coltrane was an American jazz saxophonist and composer.
    [data] => Array
        (
            [ID] => 2
            [user_login] => john
            [user_pass] => 
            [user_nicename] => John
            [user_email] => john@wpcerber.com
            [user_url] => http://wpcerber.com
            [user_registered] => 2014-12-22 20:51:53
            [user_activation_key] => 
            [user_status] => 0
            [display_name] => John Coltrane
        )

    [caps] => Array
        (
            [administrator] => 1
            [frm_view_forms] => 1
            [frm_edit_forms] => 1
            [frm_delete_forms] => 1
            [frm_change_settings] => 1
            [bbp_keymaster] => 1
        )

    [cap_key] => mb_capabilities
    [roles] => Array
        (
            [0] => administrator
            [5] => bbp_keymaster
        )

    [allcaps] => Array
        (
            [switch_themes] => 1
            [edit_themes] => 1
            [activate_plugins] => 1
            [edit_plugins] => 1
            [edit_users] => 1
            [edit_files] => 1
            [manage_options] => 1
            [moderate_comments] => 1
            [manage_categories] => 1
            [manage_links] => 1
            [upload_files] => 1
            [import] => 1
            [unfiltered_html] => 1
            [edit_posts] => 1
            [edit_others_posts] => 1
            [edit_published_posts] => 1
            [publish_posts] => 1
            [edit_pages] => 1
            [read] => 1
            [level_10] => 1
            [level_9] => 1
            [level_8] => 1
            [level_7] => 1
            [level_6] => 1
            [level_5] => 1
            [level_4] => 1
            [level_3] => 1
            [level_2] => 1
            [level_1] => 1
            [level_0] => 1
            [edit_others_pages] => 1
            [edit_published_pages] => 1
            [publish_pages] => 1
            [delete_pages] => 1
            [delete_others_pages] => 1
            [delete_published_pages] => 1
            [delete_posts] => 1
            [delete_others_posts] => 1
            [delete_published_posts] => 1
            [delete_private_posts] => 1
            [edit_private_posts] => 1
            [read_private_posts] => 1
            [delete_private_pages] => 1
            [edit_private_pages] => 1
            [read_private_pages] => 1
            [delete_users] => 1
            [create_users] => 1
            [unfiltered_upload] => 1
            [edit_dashboard] => 1
            [update_plugins] => 1
            [delete_plugins] => 1
            [install_plugins] => 1
            [update_themes] => 1
            [install_themes] => 1
            [update_core] => 1
            [list_users] => 1
            [remove_users] => 1
            [promote_users] => 1
            [edit_theme_options] => 1
            [delete_themes] => 1
            [export] => 1
            [frm_view_forms] => 1
            [frm_edit_forms] => 1
            [frm_delete_forms] => 1
            [frm_change_settings] => 1
            [copy_posts] => 1
            [administrator] => 1
            [bbp_keymaster] => 1
        )

This pattern is using get_userdata() function to retrieve user data.
See also: Check if user has a particular role.

No Comments

Sorry, the comment form is closed at this time.