function password_policy_user_insert in Password Policy 7.2
Same name and namespace in other branches
- 7 password_policy.module \password_policy_user_insert()
Implements hook_user_insert().
File
- ./
password_policy.module, line 365 - Enforces password policies.
Code
function password_policy_user_insert(&$edit, $account, $category) {
if (!empty($edit['pass'])) {
// New users do not yet have a uid during the validation step, but they do
// have one at this insert step. Store their first password in the system
// for use with the history constraint (if used).
// A new user's first password can be system-generated. Store indicator of
// system-generated password to bypass delay constraint (if used).
if ($account->uid) {
$is_password_generated = variable_get('user_email_verification', TRUE);
_password_policy_store_password($account->uid, $edit['pass'], $is_password_generated);
}
}
}