You are here

function aes_user_login in AES encryption 7

Implements hook_user_login().

File

./aes.module, line 178
Main file of the AES encryption module.

Code

function aes_user_login(&$edit, $account) {
  if (variable_get("aes_convert", FALSE) && aes_password_exists($account->uid) == FALSE && isset($edit['input']) && isset($edit['input']['pass'])) {
    db_insert('aes_passwords')
      ->fields(array(
      'uid' => $account->uid,
      'pass' => aes_encrypt($edit['input']['pass']),
    ))
      ->execute();
  }
}