<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Script Solution&#187; add</title>
	<atom:link href="http://www.openscriptsolution.com/tag/add/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Tue, 31 Jan 2012 03:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Add user_registered Column in Authors &amp; Users Page on wp-admin of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 02:28:52 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[kolom]]></category>
		<category><![CDATA[pendaftaran]]></category>
		<category><![CDATA[registered date]]></category>
		<category><![CDATA[tanggal]]></category>
		<category><![CDATA[Users & Authors]]></category>
		<category><![CDATA[user_registered]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1092</guid>
		<description><![CDATA[Once upon a time, I needed to monitor when did my users register their account in one of my WordPress website. It meant that I needed to get the value from user_registered field in the users table, and then displaying it in Authors &#038; Users page on wp-admin of WordPress. I have searched for the [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, I needed to monitor when did my users register their account in one of my WordPress website. It meant that I needed to get the value from <strong>user_registered</strong> field in the users table, and then displaying it in <strong>Authors &#038; Users</strong> page on wp-admin of WordPress. I have searched for the plugin regarding this, but I found nothing. Actually, I wanted to create the plugin to implement it. Unfortunately, I still have no idea how to do this, since I am not expert to create the plugin (probably someday I can do it). So I decided to edit the core file of WordPress. First of all, I opened the <strong>users.php</strong> file that located in <strong>wp-admin</strong> sub directory. After investigating this file for a few minutes, then I found the code regarding how to display the users list in <strong>template.php</strong> based on the code or function call <strong>user_row</strong> and <strong>get_column_headers</strong>. This template.php file located in <strong>/wp-admin/includes/</strong> sub directory. So, here is the modification I made. <span id="more-1092"></span></p>
<p>Open your <strong>/wp-admin/includes/template.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>899
900
901
902
903
904
905
906
907
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">:</span>
			<span style="color: #000088;">$_wp_column_headers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
				<span style="color: #0000ff;">'cb'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;input type=&quot;checkbox&quot; /&gt;'</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'email'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'role'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Role'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'posts'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts'</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>899
900
901
902
903
904
905
906
907
908
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">:</span>
			<span style="color: #000088;">$_wp_column_headers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
				<span style="color: #0000ff;">'cb'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;input type=&quot;checkbox&quot; /&gt;'</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'email'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'role'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Role'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'posts'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'user_registered'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Registered Date'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// added by Masino Sinaga, January 13, 2010</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1985
1986
1987
1988
1989
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;td <span style="color: #006699; font-weight: bold;">$attributes</span>&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'manage_users_custom_column'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$column_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>before the first line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1984
1985
1986
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'user_registered'</span><span style="color: #339933;">:</span>  <span style="color: #666666; font-style: italic;">// added by Masino Sinaga, January 13, 2010</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;td <span style="color: #006699; font-weight: bold;">$attributes</span>&gt;<span style="color: #006699; font-weight: bold;">$user_object-&gt;user_registered</span>&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That&#8217;s all. Now, go to your wp-admin of your WordPress website, then see the <strong>Authors &#038; Users</strong> page under the <strong>Users</strong> menu. You should see now the new column at the right most of the list named <strong>Registered Date</strong>. I had tested and it worked like a charm.</p>
<p>Please do not hesitate to leave your comment if you have a new idea how to implement this using the plugin in WordPress.</p>
<p>Hopefully this will help someone else out there.</p>
<p><strong>Updated on October 5, 2011</strong>: That article above I wrote when the version of WordPress was under 3.0. I found a great plugin today in order to do the same function above. It is <a href="http://wordpress.org/extend/plugins/recently-registered/" title="Recently Registered plugin" target="_blank"><strong>Recently Registered</strong></a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2010%2F01%2F13%2Fhow-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress%2F&amp;title=How%20to%20Add%20user_registered%20Column%20in%20Authors%20%26%23038%3B%20Users%20Page%20on%20wp-admin%20of%20WordPress" id="wpa2a_2"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
