Thread Starter
jonk3
(@jonk3)
Hi, thanks for the quick reply.
I have adjusted the um-actions-register.php to hold a conditional which is presently working as I expected but it is hardcoded ideally driven by values from the plugin settings.
Thanks
function um_post_registration_pending_hook( $user_id, $args ) {
um_fetch_user( $user_id );
$user_info = get_userdata($user_id);
$email = $user_info->user_email;
$parts = explode('@', $email);
$domain = strtolower($parts[1]);
if ($domain == "MYDOMAIN.com") {
UM()->user()->approve();
} else {
UM()->user()->pending();
}
//UM()->user()->approve(); // Previous code
}