<!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>[Tests][1016] trunk/tests/xmlrpc/wp: Tests for wp.getProfile, wp.editProfile, wp.getUsers, wp.getUser.</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, #logmsg > ol { margin-left: 0; 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">
<dt>Revision</dt> <dd><a href="http://unit-tests.trac.wordpress.org/changeset/1016">1016</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2012-09-12 00:05:19 +0000 (Wed, 12 Sep 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Tests for wp.getProfile, wp.editProfile, wp.getUsers, wp.getUser. props maxcutler. see #WP18428.</pre>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunktestsxmlrpcwpeditProfilephp">trunk/tests/xmlrpc/wp/editProfile.php</a></li>
<li><a href="#trunktestsxmlrpcwpgetProfilephp">trunk/tests/xmlrpc/wp/getProfile.php</a></li>
<li><a href="#trunktestsxmlrpcwpgetUserphp">trunk/tests/xmlrpc/wp/getUser.php</a></li>
<li><a href="#trunktestsxmlrpcwpgetUsersphp">trunk/tests/xmlrpc/wp/getUsers.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsxmlrpcwpeditProfilephp"></a>
<div class="addfile"><h4>Added: trunk/tests/xmlrpc/wp/editProfile.php (0 => 1016)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/xmlrpc/wp/editProfile.php                                (rev 0)
+++ trunk/tests/xmlrpc/wp/editProfile.php        2012-09-12 00:05:19 UTC (rev 1016)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ * @group user
+ */
+class TestXMLRPCServer_wp_editProfile extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_editProfile( array( 1, 'username', 'password', array() ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+    function test_subscriber_profile() {
+        $subscriber_id = $this-&gt;make_user_by_role( 'subscriber' );
+
+        $new_data = array(
+            'first_name' =&gt; rand_str(),
+            'last_name' =&gt; rand_str(),
+            'website' =&gt; 'http://www.example.org/subscriber',
+            'display_name' =&gt; rand_str(),
+            'nickname' =&gt; rand_str(),
+            'nicename' =&gt; rand_str(),
+            'bio' =&gt; rand_str(200)
+        );
+        $result = $this-&gt;myxmlrpcserver-&gt;wp_editProfile( array( 1, 'subscriber', 'subscriber', $new_data ) );
+        $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        $this-&gt;assertTrue( $result );
+
+        // verify that the new values were stored
+        $user_data = get_userdata( $subscriber_id );
+        $this-&gt;assertEquals( $new_data['first_name'], $user_data-&gt;first_name );
+        $this-&gt;assertEquals( $new_data['last_name'], $user_data-&gt;last_name );
+        $this-&gt;assertEquals( $new_data['website'], $user_data-&gt;user_url );
+        $this-&gt;assertEquals( $new_data['display_name'], $user_data-&gt;display_name );
+        $this-&gt;assertEquals( $new_data['nickname'], $user_data-&gt;nickname );
+        $this-&gt;assertEquals( $new_data['nicename'], $user_data-&gt;user_nicename );
+        $this-&gt;assertEquals( $new_data['bio'], $user_data-&gt;description );
+    }
+
+    function test_ignore_password_change() {
+        $this-&gt;make_user_by_role( 'author' );
+        $new_pass = rand_str();
+        $new_data = array( 'password' =&gt; $new_pass );
+
+        $result = $this-&gt;myxmlrpcserver-&gt;wp_editProfile( array( 1, 'author', 'author', $new_data ) );
+        $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        $this-&gt;assertTrue( $result );
+
+        $auth_old = wp_authenticate( 'author', 'author' );
+        $auth_new = wp_authenticate( 'author', $new_pass );
+        $this-&gt;assertInstanceOf( 'WP_User', $auth_old );
+        $this-&gt;assertTrue( is_wp_error( $auth_new ) );
+    }
+
+    function test_ignore_email_change() {
+        $editor_id = $this-&gt;make_user_by_role( 'editor' );
+        $new_email = rand_str() . '@example.com';
+        $new_data = array( 'email' =&gt; $new_email );
+
+        $result = $this-&gt;myxmlrpcserver-&gt;wp_editProfile( array( 1, 'editor', 'editor', $new_data ) );
+        $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+        $this-&gt;assertTrue( $result );
+
+        $user_data = get_userdata( $editor_id );
+        $this-&gt;assertNotEquals( $new_email, $user_data-&gt;email );
+    }
+}
</ins></span></pre></div>
<a id="trunktestsxmlrpcwpgetProfilephp"></a>
<div class="addfile"><h4>Added: trunk/tests/xmlrpc/wp/getProfile.php (0 => 1016)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/xmlrpc/wp/getProfile.php                                (rev 0)
+++ trunk/tests/xmlrpc/wp/getProfile.php        2012-09-12 00:05:19 UTC (rev 1016)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ * @group user
+ */
+class TestXMLRPCServer_wp_getProfile extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getProfile( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_subscriber() {
+                $subscriber_id = $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getProfile( array( 1, 'subscriber', 'subscriber' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $subscriber_id, $result['user_id'] );
+                $this-&gt;assertContains( 'subscriber', $result['roles'] );
+        }
+
+        function test_administrator() {
+                $administrator_id = $this-&gt;make_user_by_role( 'administrator' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getProfile( array( 1, 'administrator', 'administrator' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $administrator_id, $result['user_id'] );
+                $this-&gt;assertContains( 'administrator', $result['roles'] );
+        }
+
+        function test_arbitrary_fields() {
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+
+                $fields = array( 'email', 'bio', 'user_contacts' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getProfile( array( 1, 'editor', 'editor', $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $editor_id, $result['user_id'] );
+
+                $expected_fields = array_merge( array( 'user_id' ), $fields );
+                $this-&gt;assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+        }
+}
</ins></span></pre></div>
<a id="trunktestsxmlrpcwpgetUserphp"></a>
<div class="addfile"><h4>Added: trunk/tests/xmlrpc/wp/getUser.php (0 => 1016)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/xmlrpc/wp/getUser.php                                (rev 0)
+++ trunk/tests/xmlrpc/wp/getUser.php        2012-09-12 00:05:19 UTC (rev 1016)
</span><span class="lines">@@ -0,0 +1,134 @@
</span><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ * @group user
+ */
+class TestXMLRPCServer_wp_getUser extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'username', 'password', 1 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 403, $result-&gt;code );
+        }
+
+        function test_invalid_user() {
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'administrator', 'administrator', 34902348908234 ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 404, $result-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'subscriber', 'subscriber', $editor_id ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( 401, $result-&gt;code );
+        }
+
+        function test_subscriber_self() {
+                $subscriber_id = $this-&gt;make_user_by_role( 'subscriber' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'subscriber', 'subscriber', $subscriber_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $subscriber_id, $result['user_id'] );
+        }
+
+        function test_valid_user() {
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $registered_date = strtotime( '-1 day' );
+                $user_data = array(
+                        'user_login' =&gt; 'getusertestuser',
+                        'user_pass' =&gt; rand_str(),
+                        'first_name' =&gt; rand_str(),
+                        'last_name' =&gt; rand_str(),
+                        'description' =&gt; rand_str( 100 ),
+                        'user_email' =&gt; 'getUserTestUser@example.com',
+                        'nickname' =&gt; rand_str(),
+                        'user_nicename' =&gt; rand_str(),
+                        'display_name' =&gt; rand_str(),
+                        'user_url' =&gt; 'http://www.example.com/testuser',
+                        'role' =&gt; 'author',
+                        'aim' =&gt; rand_str(),
+                        'user_registered' =&gt; strftime( &quot;%Y-%m-%d %H:%M:%S&quot;, $registered_date )
+                );
+                $user_id = wp_insert_user( $user_data );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'administrator', 'administrator', $user_id ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+
+                // check data types
+                $this-&gt;assertInternalType( 'string', $result['user_id'] );
+                $this-&gt;assertStringMatchesFormat( '%d', $result['user_id'] );
+                $this-&gt;assertInternalType( 'string', $result['username'] );
+                $this-&gt;assertInternalType( 'string', $result['first_name'] );
+                $this-&gt;assertInternalType( 'string', $result['last_name'] );
+                $this-&gt;assertInstanceOf( 'IXR_Date', $result['registered'] );
+                $this-&gt;assertInternalType( 'string', $result['bio'] );
+                $this-&gt;assertInternalType( 'string', $result['email'] );
+                $this-&gt;assertInternalType( 'string', $result['nickname'] );
+                $this-&gt;assertInternalType( 'string', $result['nicename'] );
+                $this-&gt;assertInternalType( 'string', $result['url'] );
+                $this-&gt;assertInternalType( 'string', $result['display_name'] );
+                $this-&gt;assertInternalType( 'array', $result['roles'] );
+
+                // check expected values
+                $this-&gt;assertEquals( $user_id, $result['user_id'] );
+                $this-&gt;assertEquals( $user_data['user_login'], $result['username'] );
+                $this-&gt;assertEquals( $user_data['first_name'], $result['first_name'] );
+                $this-&gt;assertEquals( $user_data['last_name'], $result['last_name'] );
+                $this-&gt;assertEquals( $registered_date, $result['registered']-&gt;getTimestamp() );
+                $this-&gt;assertEquals( $user_data['description'], $result['bio'] );
+                $this-&gt;assertEquals( $user_data['user_email'], $result['email'] );
+                $this-&gt;assertEquals( $user_data['nickname'], $result['nickname'] );
+                $this-&gt;assertEquals( $user_data['user_nicename'], $result['nicename'] );
+                $this-&gt;assertEquals( $user_data['user_url'], $result['url'] );
+                $this-&gt;assertEquals( $user_data['display_name'], $result['display_name'] );
+                $this-&gt;assertEquals( $user_data['user_login'], $result['username'] );
+                $this-&gt;assertContains( $user_data['role'], $result['roles'] );
+
+                wp_delete_user( $user_id );
+        }
+
+        function test_no_fields() {
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array() ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $editor_id, $result['user_id'] );
+
+                $expected_fields = array( 'user_id' );
+                $this-&gt;assertEquals( $expected_fields, array_keys( $result ) );
+        }
+
+        function test_basic_fields() {
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, array( 'basic' ) ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $editor_id, $result['user_id'] );
+
+                $expected_fields = array( 'user_id', 'username', 'email', 'registered', 'display_name', 'nicename' );
+                $this-&gt;assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+        }
+
+        function test_arbitrary_fields() {
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $fields = array( 'email', 'bio', 'user_contacts' );
+
+                $result = $this-&gt;myxmlrpcserver-&gt;wp_getUser( array( 1, 'administrator', 'administrator', $editor_id, $fields ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $result );
+                $this-&gt;assertEquals( $editor_id, $result['user_id'] );
+
+                $expected_fields = array_merge( array( 'user_id' ), $fields );
+                $this-&gt;assertEquals( sort( $expected_fields ), sort( array_keys( $result ) ) );
+        }
+}
</ins></span></pre></div>
<a id="trunktestsxmlrpcwpgetUsersphp"></a>
<div class="addfile"><h4>Added: trunk/tests/xmlrpc/wp/getUsers.php (0 => 1016)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/tests/xmlrpc/wp/getUsers.php                                (rev 0)
+++ trunk/tests/xmlrpc/wp/getUsers.php        2012-09-12 00:05:19 UTC (rev 1016)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+&lt;?php
+
+/**
+ * @group xmlrpc
+ * @group user
+ */
+class TestXMLRPCServer_wp_getUsers extends WP_XMLRPC_UnitTestCase {
+
+        function test_invalid_username_password() {
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'username', 'password' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( 403, $results-&gt;code );
+        }
+
+        function test_incapable_user() {
+                $this-&gt;make_user_by_role( 'subscriber' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'subscriber', 'subscriber' ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( 401, $results-&gt;code );
+        }
+
+        function test_capable_user() {
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator' ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+        }
+
+        function test_invalid_role() {
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $filter = array( 'role' =&gt; rand_str() );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+                $this-&gt;assertInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertEquals( 403, $results-&gt;code );
+        }
+
+        function test_role_filter() {
+                $author_id = $this-&gt;make_user_by_role( 'author' );
+                $editor_id = $this-&gt;make_user_by_role( 'editor' );
+                $administrator_id = $this-&gt;make_user_by_role( 'administrator' );
+
+                // test a single role ('editor')
+                $filter = array( 'role' =&gt; 'editor' );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+                $this-&gt;assertCount( 1, $results );
+                $this-&gt;assertEquals( $editor_id, $results[0]['user_id'] );
+
+                // test 'authors', which should return all non-subscribers
+                $filter2 = array( 'who' =&gt; 'authors' );
+                $results2 = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator', $filter2 ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results2 );
+                $this-&gt;assertCount( 3, array_intersect( array( $author_id, $editor_id, $administrator_id ), wp_list_pluck( $results2, 'user_id' ) ) );
+        }
+
+        function test_paging_filters() {
+                $this-&gt;make_user_by_role( 'administrator' );
+                $this-&gt;factory-&gt;user-&gt;create_many( 13 );
+
+                $user_ids = get_users( array( 'fields' =&gt; 'ID' ) );
+
+                $users_found = array();
+                $page_size = floor( count( $user_ids ) / 3 );
+
+                $filter = array( 'number' =&gt; $page_size, 'offset' =&gt; 0 );
+                do {
+                        $presults = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+                        foreach ( $presults as $user ) {
+                                $users_found[] = $user['user_id'];
+                        }
+                        $filter['offset'] += $page_size;
+                } while ( count( $presults ) &gt; 0 );
+
+                // verify that $user_ids matches $users_found
+                $this-&gt;assertEquals( 0, count( array_diff( $user_ids, $users_found ) ) );
+        }
+
+        function test_order_filters() {
+                $this-&gt;make_user_by_role( 'administrator' );
+
+                $filter = array( 'orderby' =&gt; 'email', 'order' =&gt; 'ASC' );
+                $results = $this-&gt;myxmlrpcserver-&gt;wp_getUsers( array( 1, 'administrator', 'administrator', $filter ) );
+                $this-&gt;assertNotInstanceOf( 'IXR_Error', $results );
+
+                $last_email = '';
+                foreach ( $results as $user ) {
+                        $this-&gt;assertLessThanOrEqual( 0, strcmp( $last_email, $user['email'] ) );
+                        $last_email = $user['email'];
+                }
+        }
+}
</ins></span></pre>
</div>
</div>

</body>
</html>