You are here

function legal_save_accept in Legal 7

Same name and namespace in other branches
  1. 8 legal.module \legal_save_accept()
  2. 5 legal.module \legal_save_accept()
  3. 6.8 legal.module \legal_save_accept()
  4. 6.7 legal.module \legal_save_accept()
  5. 7.2 legal.module \legal_save_accept()
  6. 2.0.x legal.module \legal_save_accept()
3 calls to legal_save_accept()
legal_login_submit in ./legal.module
legal_user_insert in ./legal.module
Implementation of hook_user_insert().
legal_user_update in ./legal.module
Implements hook_user_update().

File

./legal.module, line 860
Module file for Legal.

Code

function legal_save_accept($version, $revision, $language, $tc_id, $uid) {
  $accepted = time();
  $data = array(
    'version' => $version,
    'revision' => $revision,
    'language' => $language,
    'tc_id' => $tc_id,
    'uid' => $uid,
    'accepted' => $accepted,
  );
  db_insert('legal_accepted')
    ->fields($data)
    ->execute();
  module_invoke_all('legal_accepted', $data);
}