Guest User

Untitled

a guest
Jan 11th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function code_testing_user_login(&$edit, $account) {
  2. watchdog('code_testing', 'User name: %name, user access: %access, user login: %login', array('%name' => $account->name, '%access' => $account->access, '%login' => $account->login), WATCHDOG_DEBUG);
  3. }
  4.  
  5. function mymodule_user_login(&$edit, $account) {
  6. if ($account->access == 0) {
  7. // The user has never logged in before.
  8. }
  9. }
  10.  
  11. function MODULE_user_login(&$edit, $account){
  12. debug($account->access);
  13. }
  14.  
  15. function MYMODULE_user_login(&$edit, $account) {
  16. if (empty($_GET['destination'])) {
  17. if (!isset($_POST['form_id']) || $_POST['form_id'] != 'user_pass_reset') {
  18.  
  19. drupal_goto('somewhere');
  20. }
  21. }
  22. }
Add Comment
Please, Sign In to add comment