Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
<?php

// Prints the users ID
echo user()->id;

// Prints the users email
echo user()->email;

In case you want to get information from other user:

Code Block
languagephp
$user = (new \Api\User())->get(19);
echo $user->email;
//or
echo (new \Api\User())->get(19)->email;
//with 19 is user_id of other user.

 

Methods

...

PropertyTypeDescription

id

int

Unique user ID#.

urlstring

Permalink to users profile.

name

string

Full name.

 

emailstringEmail
name_linkstringHTML link to the users profile with wrapped around their name.
photoarray

An associative array of photos of the user.


Available sizes: 50px, 120px, 200px & original

Usage:

Code Block
echo user()->photo['50px']
photo_linkstringHTML link to a users profile wrapped around their profile image.
locationarray

An associative array of a users location.


Available values: iso

Usage:

Code Block
user()->location['iso']
genderarrayAn associative array of a users gender. 

Available values: id = Gender ID, name = Gender phrase

Usage:

Code Block
user()->gender['name']
dobarrayAn associative array of a users date of birth.

Available values: day = Gender ID, month = Gender phrase, year = Year

Usage:

Code Block
echo user()->dob['day'] . '/' . user()->dob['month'] . '/' . user()->dob['year'];
groupobject

An associative object of a users user group.


Available values: id = User Group ID

Usage:

Code Block
echo user()->group->id;