Execute code right after user logs in
-
Hey I
m trying to execute code that saves user
s location when he logs in the site.
I tried adding this to wp-forge/function.php$cu = wp_get_current_user(); $login = $cu->login; add_action( 'wp_login', 'add_user_location', 10, 2 ); function add_user_location( $login, $cu ) { /* code */ }
I used die(); inside the code to check if it executes or not and it doesnt.
Can you help me ?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Execute code right after user logs in’ is closed to new replies.