<!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" />
<title>[BuddyPress][11089] trunk: Groups: Remove 'populate_extras' flag from `BP_Groups_Group`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/11089">11089</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/11089","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-09-13 05:35:42 +0000 (Tue, 13 Sep 2016)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Groups: Remove 'populate_extras' flag from `BP_Groups_Group`.
`populate_extras` was originally designed to reduce the number of
additional queries performed when setting up a group, by making those
queries optional in cases where the additional data was not needed.
Now, all of these properties are adequately cached, and lazy-loaded
so that they're only fetched when requested.
See <a href="http://buddypress.trac.wordpress.org/ticket/5451">#5451</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupscomponentphp">trunk/src/bp-groups/classes/class-bp-groups-component.php</a></li>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupsgroupphp">trunk/src/bp-groups/classes/class-bp-groups-group.php</a></li>
<li><a href="#trunktestsphpunittestcasesgroupsclassbpgroupsgroupphp">trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php</a></li>
<li><a href="#trunktestsphpunittestcasesgroupsfunctionsphp">trunk/tests/phpunit/testcases/groups/functions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpgroupsclassesclassbpgroupscomponentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/classes/class-bp-groups-component.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-component.php 2016-09-13 04:47:57 UTC (rev 11088)
+++ trunk/src/bp-groups/classes/class-bp-groups-component.php 2016-09-13 05:35:42 UTC (rev 11089)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -253,17 +253,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->current_group->is_visible = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If this is a private or hidden group, does the user have access?
- if ( 'private' == $this->current_group->status || 'hidden' == $this->current_group->status ) {
- if ( $this->current_group->is_user_member && is_user_logged_in() || bp_current_user_can( 'bp_moderate' ) ) {
- $this->current_group->user_has_access = true;
- } else {
- $this->current_group->user_has_access = false;
- }
- } else {
- $this->current_group->user_has_access = true;
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> // Check once if the current group has a custom front template.
</span><span class="cx" style="display: block; padding: 0 10px"> $this->current_group->front_template = bp_groups_get_front_template( $this->current_group );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupsgroupphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/classes/class-bp-groups-group.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-group.php 2016-09-13 04:47:57 UTC (rev 11088)
+++ trunk/src/bp-groups/classes/class-bp-groups-group.php 2016-09-13 05:35:42 UTC (rev 11089)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +113,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @var bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public $is_member;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected $is_member;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Does the current user have an outstanding invitation to this group?
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,7 +121,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @var bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public $is_invited;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected $is_invited;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Does the current user have a pending membership request to this group?
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,7 +129,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @var bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public $is_pending;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected $is_pending;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Timestamp of the last activity that happened in this group.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -145,7 +145,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @var bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public $user_has_access;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ protected $user_has_access;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Raw arguments passed to the constructor.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -164,16 +164,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * the object will be pre-populated with info about that group.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args {
</span><span class="cx" style="display: block; padding: 0 10px"> * Array of optional arguments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type bool $populate_extras Whether to fetch "extra" data about the group
- * (group admins/mods, access for the current user).
- * Default: false.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type bool $populate_extras Deprecated.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $id = null, $args = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->args = wp_parse_args( $args, array(
- 'populate_extras' => false,
- ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( !empty( $id ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->id = (int) $id;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->populate();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -216,30 +210,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->status = $group->status;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->enable_forum = (int) $group->enable_forum;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->date_created = $group->date_created;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- // Are we getting extra group data?
- if ( ! empty( $this->args['populate_extras'] ) ) {
-
- // Set user-specific data.
- $user_id = bp_loggedin_user_id();
- $this->is_member = groups_is_user_member( $user_id, $this->id );
- $this->is_invited = groups_check_user_has_invite( $user_id, $this->id );
- $this->is_pending = groups_check_for_membership_request( $user_id, $this->id );
-
- // If this is a private or hidden group, does the current user have access?
- if ( ( 'private' === $this->status ) || ( 'hidden' === $this->status ) ) {
-
- // Assume user does not have access to hidden/private groups.
- $this->user_has_access = false;
-
- // Group members or community moderators have access.
- if ( ( $this->is_member && is_user_logged_in() ) || bp_current_user_can( 'bp_moderate' ) ) {
- $this->user_has_access = true;
- }
- } else {
- $this->user_has_access = true;
- }
- }
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -424,6 +394,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> case 'mods' :
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->get_mods();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ case 'is_member' :
+ return $this->get_is_member();
+
+ case 'is_invited' :
+ return groups_check_user_has_invite( bp_loggedin_user_id(), $this->id );
+
+ case 'is_pending' :
+ return groups_check_for_membership_request( bp_loggedin_user_id(), $this->id );
+
+ case 'user_has_access' :
+ return $this->get_user_has_access();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> default :
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -444,6 +426,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> switch ( $key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> case 'last_activity' :
</span><span class="cx" style="display: block; padding: 0 10px"> case 'total_member_count' :
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ case 'admins' :
+ case 'mods' :
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> default :
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -452,6 +436,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Magic setter.
+ *
+ * Used to maintain backward compatibility for properties that are now
+ * accessible only via magic method.
+ *
+ * @since 2.7.0
+ *
+ * @param string $key Property name.
+ */
+ public function __set( $key, $value ) {
+ switch ( $key ) {
+ case 'user_has_access' :
+ return $this->user_has_access = (bool) $value;
+ }
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Get a list of the group's admins.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Used to provide cache-friendly access to the 'admins' property of
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -530,6 +531,50 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->mods = $mod_objects;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Checks whether the logged-in user is a member of the group.
+ *
+ * @since 2.7.0
+ *
+ * @return bool
+ */
+ protected function get_is_member() {
+ if ( isset( $this->is_member ) ) {
+ return $this->is_member;
+ }
+
+ $this->is_member = groups_is_user_member( bp_loggedin_user_id(), $this->id );
+ return $this->is_member;
+ }
+
+ /**
+ * Checks whether the logged-in user has access to the group.
+ *
+ * @since 2.7.0
+ *
+ * @return bool
+ */
+ protected function get_user_has_access() {
+ if ( isset( $this->user_has_access ) ) {
+ return $this->user_has_access;
+ }
+
+ if ( ( 'private' === $this->status ) || ( 'hidden' === $this->status ) ) {
+
+ // Assume user does not have access to hidden/private groups.
+ $this->user_has_access = false;
+
+ // Group members or community moderators have access.
+ if ( ( is_user_logged_in() && $this->get_is_member() ) || bp_current_user_can( 'bp_moderate' ) ) {
+ $this->user_has_access = true;
+ }
+ } else {
+ $this->user_has_access = true;
+ }
+
+ return $this->user_has_access;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /** Static Methods ****************************************************/
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestcasesgroupsclassbpgroupsgroupphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php 2016-09-13 04:47:57 UTC (rev 11088)
+++ trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php 2016-09-13 05:35:42 UTC (rev 11089)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1299,6 +1299,75 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @ticket BP5451
+ */
+ public function test_is_member_property() {
+ $users = $this->factory->user->create_many( 2 );
+
+ $g = $this->factory->group->create( array(
+ 'creator_id' => $users[0],
+ ) );
+
+ wp_set_current_user( $users[1] );
+
+ $group_a = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_a->is_member );
+
+ $this->add_user_to_group( $users[1], $g );
+ $group_b = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_b->is_member );
+ }
+
+ /**
+ * @ticket BP5451
+ */
+ public function test_is_invited_property() {
+ $users = $this->factory->user->create_many( 2 );
+
+ $g = $this->factory->group->create( array(
+ 'creator_id' => $users[0],
+ ) );
+
+ wp_set_current_user( $users[1] );
+
+ $group_a = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_a->is_invited );
+
+ $this->add_user_to_group( $users[1], $g, array(
+ 'invite_sent' => 1,
+ 'inviter_id' => $users[0],
+ 'is_confirmed' => 0,
+ ) );
+ $group_b = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_b->is_invited );
+ }
+
+ /**
+ * @ticket BP5451
+ */
+ public function test_is_pending_property() {
+ $users = $this->factory->user->create_many( 2 );
+
+ $g = $this->factory->group->create( array(
+ 'creator_id' => $users[0],
+ ) );
+
+ wp_set_current_user( $users[1] );
+
+ $group_a = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_a->is_pending );
+
+ $this->add_user_to_group( $users[1], $g, array(
+ 'is_confirmed' => 0,
+ 'invite_sent' => 0,
+ 'inviter_id' => 0,
+ ) );
+ $group_b = new BP_Groups_Group( $g );
+ $this->assertFalse( $group_b->is_pending );
+ }
+
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * @group group_types
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_group_type_single_value() {
</span></span></pre></div>
<a id="trunktestsphpunittestcasesgroupsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/testcases/groups/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/testcases/groups/functions.php 2016-09-13 04:47:57 UTC (rev 11088)
+++ trunk/tests/phpunit/testcases/groups/functions.php 2016-09-13 05:35:42 UTC (rev 11089)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -613,30 +613,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @group groups_get_group
- * @group cache
- */
- public function test_groups_get_group_cache_different_users() {
- $g = $this->factory->group->create();
- $u1 = $this->factory->user->create();
- $u2 = $this->factory->user->create();
- $this->add_user_to_group( $u1, $g );
-
- $old_user = get_current_user_id();
- $this->set_current_user( $u1 );
-
- $group1 = groups_get_group( array( 'group_id' => $g, 'populate_extras' => true ) );
-
- $this->set_current_user( $u2 );
-
- $group2 = groups_get_group( array( 'group_id' => $g, 'populate_extras' => true ) );
-
- $this->assertNotEquals( $group1, $group2 );
-
- $this->set_current_user( $old_user );
- }
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * @group counts
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_invite_count_for_user() {
</span></span></pre>
</div>
</div>
</body>
</html>