Page 1 of 1

Force Password change

Posted: 2017-08-29 01:49
by charmed_ones
I'm trying to get my members to change their passwords using the hook files.
I can't seem to get it

Code: Select all


function account_id_init(&$options, $memberInfo, &$args){


        $creationDate=sqlValue("select pw_change from membership_users
	  where pw_change='pw_change' and memberID='{$data['selectedID']}'");
	
	 
	if($creationDate < strtotime('90 days'))
	{
  
header( "Location: https://xxxxxxx.xom/reports/force_membership_update.php" );
}

else
{

    header( "url:account_id_view.php" ); 
}

	
		
	}
the PW-change field is marked a DATE
have the profile set to update the date field when the password is changed.
but I can't get the Date to be checked for over 90 and direct it to the correct page.
Any one have any ideas?

Re: Force Password change

Posted: 2017-08-31 20:12
by AhmedBR
I have an idea,use the login function to do the redirect.

take a look at this topic:
viewtopic.php?f=4&t=1348

Give it a try ;)