SDK
SDK PHP v3.x
1

whoAmI #

Returns informations about the user who is currently loggedin.


whoAmI(callback) #

Arguments Type Description
callback function Callback handling the response

Callback Response #

Returns an instantiated User object.

Usage #

Copied to clipboard!
<?php
use \Kuzzle\Kuzzle;
use \Kuzzle\Security\User;
$kuzzle = new Kuzzle('localhost');
try {
  $me = $kuzzle->whoAmI();
  // $me instanceof User
}
catch (ErrorException $e) {
}