Hi,
This is a bit complicated, but I have some time now.
@aficionado, More Edit only deals with ads, so it has no use here.
@marius, if validation mail is diverted to Admin, no need to activate User Account through Admin Dashboard, Admin could use the normal link for validation (and then the "Registration succesful" mail to the real user would be automatically sent).
So:
1.- Core modification to function fn_email_user_validation as shown in
this post (although this function could be replaced through hooks with no core modification, more on this later after you check that my proposal is working fine).
2.-
Add this at the very bottom of your theme functions.php:
Notes:1.- Take care not to leave blank lines after this.
2.- If your theme functions.php doesn't end with
?> skip first line of my code.
<?php
function cust_user_register_admin_approval_message($message) {
$message = str_replace(__('The user has been created. An activation email has been sent'), _m('The user has been created, but Admin still needs to approve your account, you\'ll receive a mail then.'), $message);
return $message;
}
osc_add_filter('flash_message_text', 'cust_user_register_admin_approval_message');
function cust_user_register_admin_approval_validated($user) {
osc_add_flash_ok_message('User account for ' . $user['s_email'] . ' succesfully activated');
header("Location: " . osc_base_url(true).'?page=main&action=logout');
exit();
}
osc_add_hook('validate_user', 'cust_user_register_admin_approval_validated');
?>
So, the flow:
1) The new user register his account and see this flash message "The user has been created, but Admin still needs to approve your account, you'll receive a mail then."
2) Admin receives a mail "Please validate your...". Clicking on the activation link, the new account is activated.
3) Real user receives a mail confirming his Account is active.
Please test this on your side.
Regards