Description


Api\User\Object user()


Using our user() function will give you access to the active users information using class properties.

Examples


<?php

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

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

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:

echo user()->photo['50px']
photo_linkstringHTML link to a users profile wrapped around their profile image.
locationstringAn associative array of a users location.