Overview

Namespaces

  • Genetsis
    • core
      • activityid
      • user
  • None

Classes

  • ActivityApi
  • AutoloaderClass
  • Config
  • Identity
  • URLBuilder
  • UserApi
  • Overview
  • Namespace
  • Class

Class UserApi

This class allow you to use the User Api

Genetsis\UserApi makes calls internally to the API to request user Data.

Namespace: Genetsis
Package: Genetsis
Category: Bean
Author: Israel Dominguez
Version: 2.0
See: http://docs.cocacola.es
Revision: Alejandro Sánchez
Located at UserApi.php
Methods summary
public static Genetsis\core\User
# getUserLogged( )

Returns the personal data of the user logged. To check if user is logged, is not necessary call to this method, you must use Identity::isConnected(). If you only need the User ID, you must use Genetsis\UserApi::getUserLoggedCkusid()

Returns the personal data of the user logged. To check if user is logged, is not necessary call to this method, you must use Identity::isConnected(). If you only need the User ID, you must use Genetsis\UserApi::getUserLoggedCkusid()

Returns

Genetsis\core\User
An object with the user logged personal data or null if is not logged
public static integer
# getUserLoggedCkusid( )

Returns User ID of user Logged, stored in Things Things You must use this method to get the ckusid of user logged

Returns User ID of user Logged, stored in Things Things You must use this method to get the ckusid of user logged

Returns

integer
User ID or null if user is not logged
public static integer
# getUserLoggedOid( )

Returns ObjectID of user Logged, stored in Things Things You must use this method to get the oid of user logged

Returns ObjectID of user Logged, stored in Things Things You must use this method to get the oid of user logged

Returns

integer
ObjectID or null if user is not logged
public static String
# getAvatarUrl( $userid, integer $width = 150, integer $height = 150 )

Method to get User Profile Image available

Method to get User Profile Image available

Parameters

$userid
$width
(optional) 150px by default
$height
(optional) 150px by default

Returns

String
url of profile image
public static
# getAvatarImg( $userid, $width = 150, $height = 150 )
public static array
# getBrands( )

Returns

array
public static
# deleteCacheUser( $ckusid = null )

Delete cache data of a user, must call this method in a post-edit or a post-complete actions

Delete cache data of a user, must call this method in a post-edit or a post-complete actions

Parameters

$ckusid
Identifier of user to delete cache data, if is not passed, the method get user logged

Throws

/Exception
public static array
# getUsers( array $identifiers )

Returns the user data stored trough the Genetsis ID personal identifier. The identifiers could be: id (ckusid), screenName, email, dni Sample: array('id'=>'XXXX','screenName'=>'xxxx');

Returns the user data stored trough the Genetsis ID personal identifier. The identifiers could be: id (ckusid), screenName, email, dni Sample: array('id'=>'XXXX','screenName'=>'xxxx');

Parameters

$identifiers
Genetsis IDs identifier to search, 'identifier' => 'value'

Returns

array

A vector of Genetsis\core\User objects with user's personal data. The array could be empty.

Throws

/Exception
API documentation generated by ApiGen