admin管理员组文章数量:1389768
It's insane, but my client wants to suppress the activation email that BuddyPress sends out for activation - she feels that the double-optin that the mass email service sends is 'enough' - that was easy enough to do by setting the email to draft mode without touching any code.
My plugin does an API to hand the just-enrolled (WP user regiatration) email to the mass email service and that's working fine. The mass email service double-optin email is going out fine to the new email address.
But after I've handed off the email address, I need to move the new user from the Pending page in Users to the main Users page with a wp role/capability of 'Subscriber' and a BuddyPres/bbpress capability/role of 'Participant' without the client having to go in and activate the user by hand. I've been searching WP codex and BuddyPress codex for hints toward an action or filter hook that will do this, but no luck so far. I've even gone so far as to try some direct sql mods ti the wp_users and wp_usermeta tables, but no luck, although mods to other items like display_name, etc worked fine.
I know the dangers of this and have explained them carefully to the client, but she still wants to crash ahead with this. She'll just have to get the lesson the hard way when her forum fills up with porn. I do plan on implementing this so it's easily reversible, but she just has to walk thru that dark valley.
Any help on some code that I can fire from my plugin that will fully activate a user as described above? Thanks for your kind help - no example code here to share because 6-8 methods I tried were all dismal failures.
本文标签: plugin developmentActivate User in Code (BuddyPressbbpress)
版权声明:本文标题:plugin development - Activate User in Code (BuddyPress+bbpress) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744637054a2616885.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论