This bums me out because otherwise this module is sweet.

The "force user password change on initial login" fails when logging in for the first time in IE6-7. A client reported an issue in firefox as well, but I only have 3.5, I'm assuming the client is using firefox 2.x or something... It also happens in safari 4.0 -- the module works beautifully in Chrome, FF 3.6 and even IE8.

But when logging in with any of the above-listed trouble browsers for the first time, I go right to the /users/username page, per drupal default behavior.

The truly bizarre thing is... when i log in via Chrome ( or other "good browsers" ), I get redirected to the force password change screen ( edit password with drupal message ) and as it should, the module doesn't let me see anything else.

If I THEN login to one of the "trouble browsers" -- after having logged in once before -- I get the redirect and error message as expected. BUT if I try to login to the "trouble browser" before logging into the "good browser" I get no redirect, and i'm allowed to keep my initial password.

I have logintoboggan and persistent_login also installed, but no other user login modules.
I know logintobaggan has a redirect setting, but I deactivated it in the module configuration.

Perhaps one of these is the culprit -- I'm uneasy to deactivate because it is a live site... Also, if it were another module conflict, why only in certain browsers?

Comments

tmsimont’s picture

Title: Redirect does not work in IE6, IE7, FF2.x, safari 4.0 » First time login redirect does not work in IE6, IE7, FF2.x, safari 4.0
tmsimont’s picture

Priority: Major » Critical
Status: Active » Needs review

So i figured it out...

Line 48 of force_password_change.module:

if($user->uid & $_GET['q'] != $change_password_url && $_GET['q'] != drupal_get_path_alias('logout'))

notice the first pair of conditions --> '&' instead of '&&'

change to:

if($user->uid && $_GET['q'] != $change_password_url && $_GET['q'] != drupal_get_path_alias('logout'))

Why did that only affect some browsers??? Who knows... maybe just a coincidence?

I'd write a patch but I don't know how...

jaypan’s picture

Status: Needs review » Fixed

Thank you for tracking the problem down. And don't worry about the patch - they are nice to get, but I have absolutely no problems with taking code as well!

The problem has been fixed in version 6.x-3.2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.