User can not register when “deep” integration.

来源:互联网 发布:word for mac 登录 编辑:程序博客网 时间:2024/05/20 06:22

Problem:

User can not register when “deep” integration.

 

bbPress will not have access to WordPress’ functions unless you manually tell bbPress to load WordPress first. This integration step is also known as “deep” integration, it is a totally optional part of integration and is not required to get shared cookies and logins working. In order to do it, you need to put require_once(dirname(__FILE__) . '/path/to/wp-load.php'); in bbPress’ bb-config.php (wp-load.php is in the same directory as WordPress’ wp-config.php file, so if your bbPress folder is directly inside your WordPress folder, the command becomes require_once(dirname(__FILE__) . '/../wp-load.php');).

 

 

When i do this,came across a registration problem in bbpress.

 

Solution:

 

http://bbpress.org/forums/topic/wp-30-beta-2-integrated-user-registration

 

The problem is that WordPress declare a global variable called $user_email and in bbPress core file register.php they use the double-dollar notation (variable variables) that are evil. EVIL. So a $$key become a $user_email that is already defined and than not assigned and blah blah blah.

原创粉丝点击