function samlauth_find_uid_by_unique_id in SAML Authentication 7
Find a user given the unique ID from the SAML IdP.
Parameters
$id:
Return value
int Returns the uid of the user with the unique ID.
2 calls to samlauth_find_uid_by_unique_id()
- samlauth_acs in ./
samlauth.module - Menu callback for /saml/acs.
- samlauth_associate_saml_id_with_account in ./
samlauth.module - Ensure that a SAML ID is associated with a given user account.
File
- ./
samlauth.module, line 424 - Provides SAML authentication capabilities.
Code
function samlauth_find_uid_by_unique_id($id) {
return db_select('authmap', 'a')
->fields('a', array(
'uid',
))
->condition('authname', $id)
->condition('module', 'samlauth')
->execute()
->fetchField();
}