admin管理员组文章数量:1391995
good day, my registration form has some custom fields, basically I want to approve the user if and only if some fields are filled with some specific values, if they're not, then these accounts must be manually approved
do you know some hook and code that I can use for this purpose?...thank you so much
good day, my registration form has some custom fields, basically I want to approve the user if and only if some fields are filled with some specific values, if they're not, then these accounts must be manually approved
do you know some hook and code that I can use for this purpose?...thank you so much
Share Improve this question asked Mar 12, 2020 at 20:04 clagccsclagccs 1033 bronze badges1 Answer
Reset to default 1 ## Try this if you are using Woocommerce
function ws_new_user_approve_registration_message(){
$not_approved_message = '<p class="registration">Send in your registration application today!<br /> NOTE: Your account will be held for moderation and you will be unable to login until it is approved.</p>';
if( isset($_REQUEST['approved']) ){
$approved = $_REQUEST['approved'];
if ($approved == 'false') echo '<p class="registration successful">Registration successful! You will be notified upon approval of your account.</p>';
else echo $not_approved_message;
}
else echo $not_approved_message;
}
add_action('woocommerce_before_customer_login_form', 'ws_new_user_approve_registration_message', 2);
本文标签: hooks for automatic approve user registration according to data in custom fields
版权声明:本文标题:hooks for automatic approve user registration according to data in custom fields 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744672857a2618931.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论