function ldapUserIsAuthmapped($username) { $authmaps = user_get_authmaps($username); return $authmaps && in_array('ldap_authentication', array_keys($authmaps)); }
/** * Return the user profile page if Obiba Agate enabled. * * @return string * The Profile path. */ function obiba_bootstrap_get_user_profile_page() { global $user; if (!empty($user->name)) { $user_authmaps = user_get_authmaps($user->name); return module_exists('obiba_agate') && (!empty($user_authmaps['obiba_agate']) && $user_authmaps['obiba_agate'] == $user->name) ? 'agate/user/profile/' : 'user'; } }