The function is too long and complicated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AohRveTPV created an issue. See original summary.

AohRveTPV’s picture

A first step: Move code duplicated throughout module to a new function, _password_policy_load_active_policy_for_user().

AohRveTPV’s picture

Title: Refactor hook_user_login() implementation » Refactor expiration code

The majority of code in hook_user_login() pertains to expiration. Refactoring this code should be done in a way that minimizes duplication of code with password_policy_process_expirations(). password_policy_process_expirations() is also too long, and needs refactoring. Therefore, want to go ahead and refactor all expiration code.