def reset_password_token_status(token):
 (expired, invalid, user, data) = get_token_status(token, 'reset', 'RESET_PASSWORD', return_data=True)
 if (not invalid):
  if user.password:
   password_hash = md5(user.password)
   if (not safe_str_cmp(password_hash, data[1])):
    invalid = True
 return (expired, invalid, user)

def reset_password_token_status ( token ) : ( expired , invalid , user , data ) = get_token_status ( token , 'reset' , 'RESET_PASSWORD' , return_data = True ) if ( not invalid ) : if user . password : password_hash = md5 ( user . password ) if ( not safe_str_cmp ( password_hash , data [ 1 ] ) ) : invalid = True return ( expired , invalid , user )
returns the expired status .