<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [3466] trunk: Fixes some WP_DEBUG errors related to login.
 php and marking users as spammers</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>3466</dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2010-11-21 22:01:09 +0000 (Sun, 21 Nov 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes some WP_DEBUG errors related to login.php and marking users as spammers</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoresettingsphp">trunk/bp-core/bp-core-settings.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpthemesbpdefaultsidebarphp">trunk/bp-themes/bp-default/sidebar.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoresettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-settings.php (3465 => 3466)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-settings.php        2010-11-21 17:13:03 UTC (rev 3465)
+++ trunk/bp-core/bp-core-settings.php        2010-11-21 22:01:09 UTC (rev 3466)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'General', 'buddypress' ), 'slug' =&gt; 'general', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_general_settings', 'position' =&gt; 10, 'user_has_access' =&gt; bp_is_my_profile() ) );
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'Notifications', 'buddypress' ), 'slug' =&gt; 'notifications', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_notification_settings', 'position' =&gt; 20, 'user_has_access' =&gt; bp_is_my_profile() ) );
</span><span class="cx"> 
</span><del>-        if ( !is_super_admin() &amp;&amp; !(int) $bp-&gt;site_options['bp-disable-account-deletion'] )
</del><ins>+        if ( !is_super_admin() &amp;&amp; !isset( $bp-&gt;site_option['bp-disable-account-deletion'] ) )
</ins><span class="cx">                 bp_core_new_subnav_item( array( 'name' =&gt; __( 'Delete Account', 'buddypress' ), 'slug' =&gt; 'delete-account', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_delete_account', 'position' =&gt; 90, 'user_has_access' =&gt; bp_is_my_profile() ) );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_setup_nav', 'bp_core_add_settings_nav' );
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (3465 => 3466)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-11-21 17:13:03 UTC (rev 3465)
+++ trunk/bp-core.php        2010-11-21 22:01:09 UTC (rev 3466)
</span><span class="lines">@@ -1843,7 +1843,8 @@
</span><span class="cx"> function bp_core_boot_spammer( $auth_obj, $username ) {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        $user = get_userdatabylogin( $username );
</del><ins>+        if ( !$user = get_userdatabylogin( $username ) )
+                return false;
</ins><span class="cx"> 
</span><span class="cx">         if ( ( is_multisite() &amp;&amp; (int)$user-&gt;spam ) || 1 == (int)$user-&gt;user_status )
</span><span class="cx">                 bp_core_redirect( $bp-&gt;root_domain );
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (3465 => 3466)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2010-11-21 17:13:03 UTC (rev 3465)
+++ trunk/bp-friends.php        2010-11-21 22:01:09 UTC (rev 3466)
</span><span class="lines">@@ -568,6 +568,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function friends_remove_data( $user_id ) {
</span><ins>+        global $bp;
+        
</ins><span class="cx">         BP_Friends_Friendship::delete_all_for_user($user_id);
</span><span class="cx"> 
</span><span class="cx">         /* Remove usermeta */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/sidebar.php (3465 => 3466)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar.php        2010-11-21 17:13:03 UTC (rev 3465)
+++ trunk/bp-themes/bp-default/sidebar.php        2010-11-21 22:01:09 UTC (rev 3466)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx">                 &lt;form name=&quot;login-form&quot; id=&quot;sidebar-login-form&quot; class=&quot;standard-form&quot; action=&quot;&lt;?php echo site_url( 'wp-login.php', 'login_post' ) ?&gt;&quot; method=&quot;post&quot;&gt;
</span><span class="cx">                         &lt;label&gt;&lt;?php _e( 'Username', 'buddypress' ) ?&gt;&lt;br /&gt;
</span><del>-                        &lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;sidebar-user-login&quot; class=&quot;input&quot; value=&quot;&lt;?php echo esc_attr(stripslashes($user_login)); ?&gt;&quot; tabindex=&quot;97&quot; /&gt;&lt;/label&gt;
</del><ins>+                        &lt;input type=&quot;text&quot; name=&quot;log&quot; id=&quot;sidebar-user-login&quot; class=&quot;input&quot; value=&quot;&lt;?php if ( isset( $user_login) ) echo esc_attr(stripslashes($user_login)); ?&gt;&quot; tabindex=&quot;97&quot; /&gt;&lt;/label&gt;
</ins><span class="cx"> 
</span><span class="cx">                         &lt;label&gt;&lt;?php _e( 'Password', 'buddypress' ) ?&gt;&lt;br /&gt;
</span><span class="cx">                         &lt;input type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;sidebar-user-pass&quot; class=&quot;input&quot; value=&quot;&quot; tabindex=&quot;98&quot; /&gt;&lt;/label&gt;
</span></span></pre>
</div>
</div>

</body>
</html>