• Appreciable,
    In a WordPress project, I am making new users log in with their phone number instead of email, email should be totally optional.

    The form only has the names, phone number and SMS code (password) required by the client.

    I have stored in the database in the wp_users and wp_usermeta table all the fields, creating the #[email protected] email, only by requirement of WP.

    Once the user is registered and validated by SMS, the user is created directly, storing its data in the respective DB tables.

    How to do so that, once the MySqli statements finish writing the data of the new user, this user is autologged (automatically) (sing-in) in WP? This is because I will redirect the new user to a private page where only registered users can access and we do not want the user to return to a form to enter their credentials.

    Any ideas?
    Thanks in advance.

    • This topic was modified 2 years, 3 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to automatically log in a wordpress user, created directly in the database’ is closed to new replies.