Forum in maintenance, we will back soon 🙂
SaaS stuff - WordPress site turn into SaaS Any ideas about Registration Page, Login Page, email from WooCommerce
To have a SaaS we NEED to Register, to sign up, to login etc...Â
How do you do that? Â
Manually???
How do you set up the membership area?
How about the registration page, login page, logout etc?Â
How about the email sent after the registration, or the buying a package...
Â
Hasan or anybody else, I'm looking forward to it!!
Â
Thank you and I do appreciate that
I've attached some files...
@alfredo-gimbuta Hello alfredo, the files dont appear.
Concerning the registration, login and so on you can use a plugin called wp-forms it's paid but it's the one @admin uses, i don't have info about any other plugins.
Concerning the membership area it's built on several plugins all discussed in the SAAS on WordPress course, please refer to it and you'll find them all.
About the email sent after registration you'll need to use an email marketing software to do that. There are plenty like convertkit, klaviyo, etc..
Hi!
WordPress has a built-in registration system. If you are looking to build a customized one, there are many plugins.Â
If you are asking about my system, I use WP Forms, but it is not the easiest approach; there are many other easier ways with other plugins.
Again, email sending is built into WordPress, and you will need some plugins to send custom emails.Â
and as @husein mentioned, you will need an email delivery service if your hosting company doesn't provide email sending.
The user area is created automatically with WooCommerce.
Â
I am preparing a video on how to create the full registration system on WordPress, if you share your thoughts and what you are looking for exactly, maybe I can explain in that video 🙂
Â
Â
Â
Thank you guys, I do appreciate that!!
Hello Sir. I pondered over the same issue and troubleshot for user registration email verification method without plugins.
Here is my template.
You can simply add these code snippets using "WP Code".
Â
[Redirect To Home After Login]
function redirect_after_login( $redirect_to, $request, $user ) {    // Redirect only when a user who is not an admin logs in    if ( ! isset( $user->roles ) || ! in_array( 'administrator', $user->roles ) ) {        return home_url(); // Redirect to the home URL    } else {        return $redirect_to; // Admin maintain the existing redirect path    } } add_filter( 'login_redirect', 'redirect_after_login', 10, 3 );
Â
Â
[Assign a Pending Verification Role After User Registration]
function set_user_pending_on_registration($user_id) { Â Â Â $user = new WP_User($user_id); Â Â Â $user->set_role('pending_verification'); } add_action('user_register', 'set_user_pending_on_registration');
Â
[Add Pending Verification Role]
function add_custom_user_roles() { Â Â Â add_role('pending_verification', 'Pending Verification', array( Â Â Â Â Â Â Â 'read' => true, Â Â Â )); } add_action('after_setup_theme', 'add_custom_user_roles');
Â
[Check User's Role When Login]
function restrict_user_login($user, $password) {    // Deny login when user’s role is ‘pending verification’    if (in_array('pending_verification', (array) $user->roles)) {        return new WP_Error('account_pending', __('Your account is pending verification.'));    }     return $user; } add_filter('wp_authenticate_user', 'restrict_user_login', 10, 2);
Â
[Disable Password Setup Email]
// Disable 'Password Setup' email upon new user registration function disable_new_user_notification_email($wp_new_user_notification_email, $user, $blogname) { Â Â Â return false; } add_filter('wp_new_user_notification_email', 'disable_new_user_notification_email', 10, 3);
Â
[Account Verification Handler]
function account_verification_handler() {    if (isset($_GET['user']) && isset($_GET['code'])) {        $user_id = $_GET['user'];        $code = $_GET['code'];         $user_meta_activation_code = get_user_meta($user_id, 'activation_code', true);         if ($code == $user_meta_activation_code) {            $user = new WP_User($user_id);            $user->set_role('subscriber'); // Set a role you want            update_user_meta($user_id, 'account_activated', 1);            echo " Your account has been activated. You can now log in.";        } else {            echo "Wrong authentication code.";        }    } } add_shortcode('verify_account', 'account_verification_handler');
Â
[Send Email Verification Code]
function send_verification_email_on_registration($user_id) {    $user_info = get_userdata($user_id);    $code = md5(time() . $user_info->user_login); // Generate verification code    update_user_meta($user_id, 'account_activated', 0);    update_user_meta($user_id, 'activation_code', $code);     $verification_link = add_query_arg(array(        'user' => $user_id,        'code' => $code    ), get_site_url() . '/verify-account'); // Generate verification page link     // Send an email    wp_mail($user_info->user_email, 'Your Verification Link', ' To activate your account, please click the following link: ' . $verification_link); // Change the title and content to your own }  add_action('user_register', 'send_verification_email_on_registration');  // Change email sender address function custom_wp_mail_from($email) {    return '[email protected]'; } add_filter('wp_mail_from', 'custom_wp_mail_from');  // Change email sender name function custom_wp_mail_from_name($name) {    return 'Your_Name'; } add_filter('wp_mail_from_name', 'custom_wp_mail_from_name');
Â
Send Email Verification Code << You can change the sender's email address and name, verification email's title and content in this snippet.
Â
@junho Thanks for this. I created a GitHub project for code snippets. Feel free to fork it and add a pull request to add new ones.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack