Articles of user register

Sending new registration meta values to admin by email

I’ve created a custom registration form which accepts extra fields like mobile number, address etc and stored into user meta values. This is working fine, now I have to add a functionality of sending email to admin with all the meta value details whenever a new user registers on the site.

Get first_name and last_name on user_register hook

I have multisite running with 4 sites. One of them has woocommerce. Customers have option to create account while checkout. I have custom analytics where registered customers are labeled with wordpress user ID (get_current_user_id()). Customers without account have default ID of 0. My analytics allow me to add first name, last name, email etc… to […]

How can I test why the comment hook is not working?

I am trying to perform an action after a comment is approved. What this action is, is to register the commenter automatically using register_new_user, using the commenter’s name as the username, and email as the user email. And a password generated automatically using wordpress and the new user is emailed their user details, which I […]

Does the user_register change in multisite?

I’ve created a function that automatically creates a new post for people when they register. It works great on a standard site but in multisite it stops working. I’ve spent hours trying to debug it. Is there a better hook to use than user_register in multisite?

How to override WordPress registration and insert an auto-generated username?

I need to auto-generate usernames upon WordPress registration. I have a custom registration form set up and would like to create the username in functions.php. Can someone tell me why this isn’t working? It seems like it should work after reading the WordPress Codex on customized registration forms? function register_hook ( $user_id ) { update_user_meta( […]

Display page only if user registered before a specific date

I’d like to know if it’s possible to display a page only for users that registered before a specific date. Example : I want to display a page (or its content) only for users registered before 1st February 2016.

Can user_register output the password?

I’m trying to output the password of a newly created user in plain text using the user_register hook as explained in this answer. However, upon doing a var_dump of $_POST, I don’t see any password output. Can user_register actually do this? If not, might you have any ideas on a hook that would do this […]

What hooks should I use for pre-login and pre-registration actions?

I am adding cookie on login page using ‘init’ action-hook. And than after login I check if this cookie exist in ‘login_init’ action-hook. And also after user registration I check if this cookie exist in ‘registration_errors’ filter-hook. Do I use proper hooks for pre-login and pre-registration actions? code: <?php $securityprotection_send_brute_force_log_to_admin = true; // if true, […]

Create posts on user registration

How can I create let say 3 posts after the user finish the registration ? The ideal outcome would be to create 3 posts using the user as the author of the posts and with some pre-defined values. (post title and slug) The post title and slug would be created from info that the user […]