00. 因為有些人使用的是免費空間而造成無法成功寄信 or 有些新註冊的使用者, 因種種的原因而收不到 WordPress 註冊後所寄送的密碼, 而造成雙方的損失。您損失了新的 Fans, 而新註冊的使用者折騰了一番, 卻還不能登入, 被拒之於門外。
wp_new_user_notification($user_id, $user_pass);
02. 下有 2 種方案, 則一使用即可
a. 在註冊後立刻顯示使用者的用戶名和密碼, 並寄信到使用者所填的信箱。
wp_new_user_notification($user_id, $user_pass);
setcookie("user_Name", $user_login);
setcookie("user_Pass", $user_pass);
b. 在註冊後立刻顯示使用者的用戶名和密碼, 不寄信到使用者所填的信箱。
// wp_new_user_notification($user_id, $user_pass);
setcookie("user_Name", $user_login);
setcookie("user_Pass", $user_pass);
03. 往下繼續找到
$errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message');04. 改成如下所示, 用以直接顯示使用者的用戶名和密碼。
$errors->add('registered',__('Registration complete.<br /> a. Check your e-mail for password.</br> b. Use the following password displayed.<br /><br/>Username : ' .$_COOKIE["user_Name"] . '<br />Password : ' .$_COOKIE['user_Pass'] . '<br />( Remember to modify the default password. )'), 'message');// 如果要改成中文, 別忘了要另存成 UTF-8, 以免出現亂碼喔。
Tags: Cookie, Registration, WordPress


September 30th, 2009 at 6:23 AM
我已关闭注册鸟,暂时用不到,呵呵,不过值得收藏一下
October 11th, 2009 at 3:43 PM
不错,要顶
December 13th, 2009 at 10:31 PM
请问邮件系统怎么关闭。。我这里好像没有 安装了wp-smtp也不行啊
May 1st, 2010 at 5:41 PM
我有安裝Customize Your Community這個插件
把登入頁面整合到前台
然後我用了這邊的方法想要直接顯是密碼
可是修改完都還是跟原本一樣
為什麼呢