Hi everyone,

I've encountered this really annoying problem I can't seem to get rid of. Some users, after registering (no admin approval is required), can't log in. According to the experience of one of them, the page simply refreshes after clicking the login button.

Now, the weird part is that every time they try to log in, their (default) avatar is displayed in the "Who's online" block. That is, if they try to log in 5 times, there will be 5 avatars of the same user in the WO block. When I check the user list via /admin/user/user, the "Last access" field for the newly created user says "never". It's a new website, and there's 25 members (approximately 7%) in the user list that have never accessed the website. Only two of them have reported the problem, and, according to their experience, both of them have tried logging in via Google Chrome.

Currently, my Drupal installation chooses whether to display the page for anonymous users or the logged in ones via template.php:

function phptemplate_preprocess_page(&$vars) {
  global $user;
  if ($user->uid) {
  	//...skipping unnecessary part

		else{
			$vars['template_file'] = 'page';
                
                //...skipping unnecessary part
		}
	 }
  }
  else {
  	//...skipping unnecessary part
	else{
    	$vars['template_file'] = 'page-anonymous';
	}
  }
}

Comments

white_pawn’s picture

Lovely. The same thing happened to me this morning, with an existing account. I would click the log in button, and end up where I started; no Drupal messages, whatsoever.

white_pawn’s picture

Any clues? Anyone?

white_pawn’s picture

Just checked the access logs. For each unsuccessful login attempt there's a "Session opened for (username)" entry, followed by an "access denied" at "user/(uid)". Since, after this, the user gets sent back to the log-in page, i.e. the system doesn't see them as logged in, it appears the session never got opened in the first place. There's still the question of how the users' avatars end up in the Who's Online block, though.

Now, does anyone know how Drupal's session management system works?

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.