GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
created_by.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the created_by field type
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
10 
11 extract( $gravityview_view->getCurrentField() );
12 
13 // There was no logged in user.
14 if( empty( $value ) ) {
15  return;
16 }
17 
18 // Get the user data for the passed User ID
19 $User = get_userdata($value);
20 
21 // Display the user data, based on the settings `id`, `username`, or `display_name`
22 $name_display = empty( $field_settings['name_display'] ) ? 'display_name' : $field_settings['name_display'];
23 
24 echo esc_html( $User->{$name_display} );
static getInstance( $passed_post=NULL)
$field_settings['content']
Definition: custom.php:27
$gravityview_view
Definition: created_by.php:9
$name_display
Definition: created_by.php:22
if(empty( $value)) $User
Definition: created_by.php:19