O365ProfileGetDataService
in package
O365ProfileGetDataService service gives basic information about the user.
Table of Contents
Properties
- $o365Graph : GraphService
- The o365.graph service.
- $ssoUserConfig : ImmutableConfig
- The config of the SSO user module.
Methods
- __construct() : mixed
- Constructs an O365ProfileGetDataService object.
- getProfileData() : array<string|int, mixed>
- Method gives the basic current logged in user information.
- getUserInitials() : string
- Get the users initials from the profile data.
Properties
$o365Graph
The o365.graph service.
protected
GraphService
$o365Graph
$ssoUserConfig
The config of the SSO user module.
protected
ImmutableConfig
$ssoUserConfig
Methods
__construct()
Constructs an O365ProfileGetDataService object.
public
__construct(GraphService $o365_graph, ConfigFactory $configFactory) : mixed
Parameters
- $o365_graph : GraphService
-
The o365.graph service.
- $configFactory : ConfigFactory
-
The config factory.
getProfileData()
Method gives the basic current logged in user information.
public
getProfileData([string|null $user_id = NULL ][, string $photoSize = '64x64' ][, bool $getPhoto = TRUE ]) : array<string|int, mixed>
Parameters
- $user_id : string|null = NULL
-
The user ID or NULL.
- $photoSize : string = '64x64'
-
The size of the user photo we need to retrieve.
- $getPhoto : bool = TRUE
-
If we want to retrieve the user photo.
Tags
Return values
array<string|int, mixed> —The list of user data.
getUserInitials()
Get the users initials from the profile data.
public
getUserInitials(array<string|int, mixed> $profileData) : string
Parameters
- $profileData : array<string|int, mixed>
-
The users profile data.
Return values
string —The users initial.