API functions

The functions below can be called by other Drupal modules to collect information about a certain user or to check whether the current user is logged in with MYDIGIPASS.COM or not.

mydigipass_logged_in_with_mydigipass()

Description

Allows to check whether the current user is logged in with MYDIGIPASS.COM.

Return value

A boolean indicating whether the user is logged in with MYDIGIPASS.COM. A return value of TRUE means that the user is logged in with MYDIGIPASS.COM.

mydigipass_user_data_by_drupal_uid($uid)

Description

This function returns an array containing the MYDIGIPASS.COM user data of a certain user based on the Drupal ID of the user. The array keys are the attribute names. For example: 'email' => 'user@example.com'.

Parameters

string $uid: A Drupal user ID.

Return value

An array containing the MYDIGIPASS.COM user data of a Drupal user. If the user is not linked with a MYDIGIPASS.COM account, an empty array will be returned. If the user is linked with MYDIGIPASS.COM, then at least the MYDIGIPASS.COM UUID and the email address will be returned.

mydigipass_user_data_by_mydigipass_uuid($uuid)

Description

This function returns an array containing the MYDIGIPASS.COM user data of a certain user based on a MYDIGIPASS.COM UUID. The array keys are the attribute names. For example: 'email' => 'user@example.com'.

Parameters

string $uuid: A MYDIGIPASS.COM UUID.

Return value

An array containing the MYDIGIPASS.COM user data of a user. If the UUID is not known in the database, an empty array will be returned. If the user is linked with MYDIGIPASS.COM, then at least the MYDIGIPASS.COM UUID and the email address will be returned.