{author…}

Description

Binds data related to the post author. If you know the ID of a post you can use {author…} to access the author name, email, and other related author metadata.

Usage

1
{author user_id="1" assign_to="author_data"}
{author user_id="1" assign_to="author_data"}

Paramters

user_id

(int/string) (required) The ID of the post author whose information you wish to retrieve.

 assign_to

(string) (required) The name of the object to which you wish to bind the author’s information.

Return Value

(object) When bounded, it assigns an object containing a data property with all the author available information.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{author user_id="1" assign_to="author_data"}
{dump var="author_data"}
 
<!-- output -->
array(2) {
  ["user_id"]=>
  string(2) "11"
  ["data"]=>
  array(56) {
    ["nickname"]=>
    string(11) "appcropolis"
    ["first_name"]=>
    string(0) ""
    ["last_name"]=>
    string(0) ""
    ["description"]=>
    string(0) ""
    ["rich_editing"]=>
    string(4) "true"
    ["comment_shortcuts"]=>
    string(5) "false"
    ["admin_color"]=>
    string(5) "fresh"
    ["use_ssl"]=>
    string(1) "0"
    ["billing_first_name"]=>
    string(0) ""
    ["billing_last_name"]=>
    string(0) ""
    ["billing_company"]=>
    string(0) ""
    ["billing_address_1"]=>
    string(0) ""
    ["billing_address_2"]=>
    string(0) ""
    ["billing_city"]=>
    string(0) ""
    ["billing_postcode"]=>
    string(0) ""
    ["billing_state"]=>
    string(0) ""
    ["billing_country"]=>
    string(0) ""
    ["billing_phone"]=>
    string(0) ""
    ["billing_email"]=>
    string(0) ""
    ["shipping_first_name"]=>
    string(0) ""
    ["shipping_last_name"]=>
    string(0) ""
    ["shipping_company"]=>
    string(0) ""
    ["shipping_address_1"]=>
    string(0) ""
    ["shipping_address_2"]=>
    string(0) ""
    ["shipping_city"]=>
    string(0) ""
    ["shipping_postcode"]=>
    string(0) ""
    ["shipping_state"]=>
    string(0) ""
    ["shipping_country"]=>
    string(0) ""
    ["skype"]=>
    string(0) ""
    ["twitter"]=>
    string(0) ""
    ["facebook"]=>
    string(0) ""
    ["linkedin"]=>
    string(0) ""
    ["googleplus"]=>
    string(0) ""
    ["position"]=>
    string(0) ""
    ["fullname"]=>
    string(1) " "
    ["website"]=>
    string(0) ""
  }
}
{author user_id="1" assign_to="author_data"}
{dump var="author_data"}

<!-- output -->
array(2) {
  ["user_id"]=>
  string(2) "11"
  ["data"]=>
  array(56) {
    ["nickname"]=>
    string(11) "appcropolis"
    ["first_name"]=>
    string(0) ""
    ["last_name"]=>
    string(0) ""
    ["description"]=>
    string(0) ""
    ["rich_editing"]=>
    string(4) "true"
    ["comment_shortcuts"]=>
    string(5) "false"
    ["admin_color"]=>
    string(5) "fresh"
    ["use_ssl"]=>
    string(1) "0"
    ["billing_first_name"]=>
    string(0) ""
    ["billing_last_name"]=>
    string(0) ""
    ["billing_company"]=>
    string(0) ""
    ["billing_address_1"]=>
    string(0) ""
    ["billing_address_2"]=>
    string(0) ""
    ["billing_city"]=>
    string(0) ""
    ["billing_postcode"]=>
    string(0) ""
    ["billing_state"]=>
    string(0) ""
    ["billing_country"]=>
    string(0) ""
    ["billing_phone"]=>
    string(0) ""
    ["billing_email"]=>
    string(0) ""
    ["shipping_first_name"]=>
    string(0) ""
    ["shipping_last_name"]=>
    string(0) ""
    ["shipping_company"]=>
    string(0) ""
    ["shipping_address_1"]=>
    string(0) ""
    ["shipping_address_2"]=>
    string(0) ""
    ["shipping_city"]=>
    string(0) ""
    ["shipping_postcode"]=>
    string(0) ""
    ["shipping_state"]=>
    string(0) ""
    ["shipping_country"]=>
    string(0) ""
    ["skype"]=>
    string(0) ""
    ["twitter"]=>
    string(0) ""
    ["facebook"]=>
    string(0) ""
    ["linkedin"]=>
    string(0) ""
    ["googleplus"]=>
    string(0) ""
    ["position"]=>
    string(0) ""
    ["fullname"]=>
    string(1) " "
    ["website"]=>
    string(0) ""
  }
}

Back to Appcropolis Framework Overview