You are here

function login_security_user_update in Login Security 8

Same name and namespace in other branches
  1. 7 login_security.module \login_security_user_update()
  2. 2.x login_security.module \login_security_user_update()

Implements hook_ENTITY_TYPE_update().

File

./login_security.module, line 34
Login Security module hooks.

Code

function login_security_user_update(UserInterface $account) {

  // The update case can be launched by the user or by any administrator.
  // On update, remove only the user information tracked.
  if ($account
    ->isActive()) {

    // Don't remove tracking events if account is being blocked.
    _login_security_remove_events($account
      ->getAccountName());
  }
}