You are here

protected function SimpleLdapSSOTestCase::getSessions in Simple LDAP 7

Same name and namespace in other branches
  1. 7.2 simple_ldap_sso/simple_ldap_sso.test \SimpleLdapSSOTestCase::getSessions()

Looks up sessions in the sessions table for a particular uid.

Parameters

int $uid: The user id to search.

2 calls to SimpleLdapSSOTestCase::getSessions()
SimpleLdapSSOTestCase::deleteSessions in simple_ldap_sso/simple_ldap_sso.test
Delete a session from the database.
SimpleLdapSSOTestCase::testSimpleLdapSSO in simple_ldap_sso/simple_ldap_sso.test
Test Simple LDAP SSO.

File

simple_ldap_sso/simple_ldap_sso.test, line 212
Simple LDAP SSO module tests.

Class

SimpleLdapSSOTestCase
@file Simple LDAP SSO module tests.

Code

protected function getSessions($uid) {
  $sql = "SELECT * FROM {sessions} WHERE uid = :uid";
  $args = array(
    ':uid' => $uid,
  );
  return db_query($sql, $args)
    ->fetch();
}