Hi guys,
First post, hope it's in the right place.
Reallllly liking Drupal. But I haven't been able to get Drupal to expire a password after x many days. Need that to happen for it to be hipaa compliant, so I started writing for it. I hit an issue with calling the redirect page, outside of that I'm good.
I'm trying to call the password page when the password is expired. The set message works great so I'm hitting that part of the code, but it always goes to the user page, and doesn't call the profile update page. Which one of these is correct, cause I can't get any of them to work..
drupal_set_message(t('TimErrPass: You password has expired..'));
return url("http://server/?q=user/2/edit");
user_pass_reset_url($username);
drupal_goto('user/password');
return drupal_get_form('user/password', $form);
what I did:
I made a new table (tim_timecode) with a varchar and int for the username and the timecode.
In the user.module, in the user_save function, I wrote some code that writes the current timestamp everytime the user hits submit from the user profile update page to my own table.
$timecode = time();
$username = $account->uid;
$result = 0;
// echo "Trying: UPDATE tim_timecode SET timecode=$timecode WHERE username=$username";
$result = db_query("UPDATE tim_timecode SET timecode=$timecode WHERE username=$username");