~canonical-isd-hackers/drupal-teams/6.x-trunk

« back to all changes in this revision

Viewing changes to openid_teams.module

  • Committer: Anthony Lenton
  • Date: 2009-03-16 11:53:34 UTC
  • Revision ID: antoniolenton@gmail.com-20090316115334-u43qvzy08w9ya7cy
Allow user 1 to login even if no teams found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
467
467
 * Implementation of hook_user().
468
468
 */
469
469
function openid_teams_user($op, &$edit, &$account, $category = NULL) {
 
470
  global $user;
470
471
  if ($op == 'login') {
471
472
    // Clear the user's cached menu
472
473
    cache_clear_all($account->uid.':', 'cache_menu', TRUE);
490
491
      $teams     = get_approved_team_mappings($response['openid.lp.is_member'],
491
492
                                              $server);
492
493
    }
493
 
    if (empty($teams) && variable_get('openid_teams_limit_to_known', false)) {
 
494
    if (empty($teams) && variable_get('openid_teams_limit_to_known', false) &&
 
495
        $user->uid != 1) {
494
496
      module_load_include('inc', 'user', 'user.pages');
495
497
      user_logout();
496
498
    }