Download & Extend

One time login password change is also redirected

Project:Front Page
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:wims
Status:needs review

Issue Summary

Would it be possible to specify paths that would not be redirected e.g user/xxxxx/edit, currently the change password redirect is being ignored after using the one time login feature.

Comments

#1

I do have the same problem... working on a patch

#2

<?php
function front_page_user($op, &$edit, &$account, $category = NULL){   
    if(
$op == 'load'){
     if(!
$account->login && $account->uid != 0 && $account->access && arg(5) == 'login'){
         
drupal_set_message(t('This is your first login. Make sure to !url first.',array('!url'=>l(t('modify your password'),'user/'.$account->uid.'/edit'))));
       }
    }
}
?>

#3

Status:active» needs review

thanks for the patch rapsli. I'll aim to include this in the next update of the module (for version 7.x)

#4

Assigned to:Anonymous» wims

Patch to solve the redirect at the one time login after a user has requested a new password:
Add this code to the front_page.module at the begin of the function front_page()

<?php
$ref
= $_SERVER['HTTP_REFERER'];
if (
stripos($ref, 'user/reset/') !== false ) {
        global
$user;
    
$output = 'user/'.$user->uid.'/edit';
    
drupal_goto($path = $output, $query = null, $fragment = null);
    return;
}
?>
nobody click here