<!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] [1851] trunk:
  Added activity stream item when a new user signs up and activates their account
 .</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1851</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-10 20:05:55 +0000 (Thu, 10 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Added activity stream item when a new user signs up and activates their account.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoreactivationphp">trunk/bp-core/bp-core-activation.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoreactivationphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-activation.php (1850 => 1851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-activation.php        2009-09-10 19:53:37 UTC (rev 1850)
+++ trunk/bp-core/bp-core-activation.php        2009-09-10 20:05:55 UTC (rev 1851)
</span><span class="lines">@@ -48,6 +48,19 @@
</span><span class="cx">                         @rename( WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/avatars/signups/' . $hashed_key, WP_CONTENT_DIR . '/blogs.dir/' . BP_ROOT_BLOG . '/files/avatars/' . $signup['user_id'] );
</span><span class="cx">                 }
</span><span class="cx">                 
</span><ins>+                /* Record the new user in the activity streams */
+                if ( function_exists( 'bp_activity_add' ) ) {
+                        $userlink = bp_core_get_userlink( $signup['user_id'] );
+                        
+                        bp_activity_add( array(
+                                'user_id' =&gt; $signup['user_id'],
+                                'content' =&gt; apply_filters( 'bp_core_activity_registered_member', sprintf( '%s is now a registered member', $userlink ), $signup['user_id'] ),
+                                'primary_link' =&gt; apply_filters( 'bp_core_actiivty_registered_member_primary_link', $userlink ),
+                                'component_name' =&gt; 'profile',
+                                'component_action' =&gt; 'new_member'        
+                        ) );
+                }
+
</ins><span class="cx">                 do_action( 'bp_core_account_activated', &amp;$signup, $_GET['key'] );
</span><span class="cx">                 bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) );
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (1850 => 1851)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2009-09-10 19:53:37 UTC (rev 1850)
+++ trunk/bp-xprofile.php        2009-09-10 20:05:55 UTC (rev 1851)
</span><span class="lines">@@ -419,6 +419,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         do_action( 'xprofile_screen_change_avatar' );
</span><ins>+        
</ins><span class="cx">         bp_core_load_template( apply_filters( 'xprofile_template_change_avatar', 'profile/change-avatar' ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -628,6 +629,7 @@
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         /* Register the activity stream actions for this component */
</span><ins>+        bp_activity_set_action( $bp-&gt;profile-&gt;id, 'new_member', __( 'New member registered', 'buddypress' ) );
</ins><span class="cx">         bp_activity_set_action( $bp-&gt;profile-&gt;id, 'updated_profile', __( 'Updated Profile', 'buddypress' ) );
</span><span class="cx">         bp_activity_set_action( $bp-&gt;profile-&gt;id, 'new_wire_post', __( 'New profile wire post', 'buddypress' ) );
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>