Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.
  • No labels