How disable auto-login after registration

Warning: This article is deprecated since version 2.5.1. 

If you require adding the users manually through the registration form, you will be login after every registration. That consumes time and gives you the hassle. This document will provide you solution on how to disable the auto login after every registration.

You can set the user role to require admin approval after registration that way, they won’t be logged in after registration, and you can approve them later from the wp-admin > users area.

To set  Registration Status , you can navigate to wp-admin > ultimate member > user roles > (edit role) > scroll to registration options section > change the option on “Registration Status” setting. You can learn more here: User Roles Settings

The code below is also a solution, it will disable the auto-login after registration:

Note: You can add the code snippet to your theme’s functions.php file or use the Code Snippets plugin.

Warning: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.