Retrieve New user’s ID
The only argument you get on user_register is the user ID. add_action( ‘user_register’, function( $user_id ) { echo $user_id; }); Maybe there is an error in your code?
The only argument you get on user_register is the user ID. add_action( ‘user_register’, function( $user_id ) { echo $user_id; }); Maybe there is an error in your code?
Usually, WordPress redirects the user to the dashboard unless it is coded otherwise. Can you look for a function hooked to the filter login_redirect in your functions.php file. For details check the codex
Are you referring to the meta bar where people can login or register? I’d recommend using jQuery, because if you make the change to the core, it’ll be overwritten once you update it. $(‘a[href*=”register”]’).text(‘join’); This basically states find an anchor tag where the href contains the word register. Once it finds it, it changes the … Read more
The default login form is not very developer friendly (and it is more developer friendly now than it used to be). If you browse the source for that page you should be able to convince yourself of that. Your plugin is not going to be able to manipulate the page the way you hope. A … Read more
Quoting from How to get WordPress Time Zone setting? you can set the option ‘gmt_offset’ with the appropriate offset from UTC. You should add the option to control it only in you site creation form. If you put it also on user which registers to an existing site (like the main site) users will be … Read more
You need to look for wp_registration_url() and wp_login_url( … ) functions inside your code.
You would want to use the user_register and edit_user_profile_update actions. In this way you’ll take care of both scenarios. Be careful. Both of these fire after the user information has already made it to the database.
Custom options – register, defaults and delete empty fields (Settings API)
Try dumping your data and you should see the problem: function coinDeposit() { $current_user = wp_get_current_user(); var_dump($current_user); die; update_user_meta( $ID, ‘depositAddress’, $account); } The user object is empty. That is because a newly created user is not automatically logged in. There is an email confirmation step, and then login. Until that login, wp_current_user() isn’t going … Read more
Editing a WordPress plugin to add my own functionality