You are here

function login_security_user in Login Security 6

Same name and namespace in other branches
  1. 5 login_security.module \login_security_user()

Implementation of hook_user().

File

./login_security.module, line 62
Login Security

Code

function login_security_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'login':

      // On success login remove any temporary protection for the IP address and the username
      _login_security_remove_events($edit['name'], ip_address());
      break;
    case 'update':

      // The update case can be launched by the user or by any administrator
      // On update, remove only the unser information tracked.
      if ($edit['status'] != 0) {

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