class O365ProfileGetDataService

O365ProfileGetDataService service gives basic information about the user.

Properties

protected GraphService $o365Graph

The o365.graph service.

protected ImmutableConfig $ssoUserConfig

The config of the SSO user module.

Methods

__construct(GraphService $o365_graph, ConfigFactory $configFactory)

Constructs an O365ProfileGetDataService object.

array
getProfileData(string|null $user_id = NULL, string $photoSize = '64x64', bool $getPhoto = TRUE)

Method gives the basic current logged in user information.

string
getUserInitials(array $profileData)

Get the users initials from the profile data.

Details

at line 37
__construct(GraphService $o365_graph, ConfigFactory $configFactory)

Constructs an O365ProfileGetDataService object.

Parameters

GraphService $o365_graph

The o365.graph service.

ConfigFactory $configFactory

The config factory.

at line 59
array getProfileData(string|null $user_id = NULL, string $photoSize = '64x64', bool $getPhoto = TRUE)

Method gives the basic current logged in user information.

Parameters

string|null $user_id

The user ID or NULL.

string $photoSize

The size of the user photo we need to retrieve.

bool $getPhoto

If we want to retrieve the user photo.

Return Value

array

The list of user data.

Exceptions

TempStoreException
GuzzleException
GraphException

at line 114
string getUserInitials(array $profileData)

Get the users initials from the profile data.

Parameters

array $profileData

The users profile data.

Return Value

string

The users initial.