Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / user_logout.twig
index 5e0f0a1d4b705e653416a54521303c85e735c62e..5dfff2f0ada14ab0f35e4990854d9e60f94dc82c 100644 (file)
@@ -1,8 +1,8 @@
 /**
  * Implements hook_user_logout().
  */
-function {{ machine_name }}_user_logout($account) {
-  db_insert('logouts')
+function {{ machine_name }}_user_logout(AccountInterface $account) {
+  \Drupal::database()->insert('logouts')
     ->fields([
       'uid' => $account->id(),
       'time' => time(),