<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8.0-nukeFEED (http://nukeSEO.com)" -->
<rss version="2.0">
    <channel>
        <title>Popular - Code Authors</title>
        <description></description>
        <link>http://www.code-authors.com/</link>
        <lastBuildDate>Thu, 11 Mar 2010 14:33:27 -0500</lastBuildDate>
        <generator>FeedCreator 1.8.0-nukeFEED (http://nukeSEO.com)</generator>
        <item>
            <title>Google Analytics</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4485#4485</link>
            <description><![CDATA[Thank you sir.  I'll have to look into that.  I am sure they must have communicated the change somehow.  I will admit, I haven't reviewed my stats in a long time.  If no time to do anything about them, why look at them... lol.]]></description>
            <author> no_email@example.com (montego)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4485#4485</guid>
        </item>
        <item>
            <title>News in home links</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=5034#5034</link>
            <description><![CDATA[Interesting... I had tried $sid as a global and it didn't work.  Thank you for this!!!!]]></description>
            <author> no_email@example.com (montego)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=5034#5034</guid>
        </item>
        <item>
            <title>Finding out about the domain</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=2597#2597</link>
            <description><![CDATA[Just wanted to confirm that referer karma code has been included in the newly released Spam Stopper module v0.01 Beta
<br />

<br />
I'm working on some updates and a few minor bug fixes now for v0.02 Beta.
<br />
If you are using the module now, any feedback would be great!!
<br />

<br />
I have had quite a few downloads (over 30 in just a couple of days) but no one has bothered sending me any spam reports so it is hard to guage how beneficial the module is over a wide audience.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=2597#2597</guid>
        </item>
        <item>
            <title>User Malfunction...</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=2771#2771</link>
            <description><![CDATA[Wohoo!! code-authors rules.
<br />
Which reminds me, I notcied some kind of php error at the bottom of the forums page trying to read an rss file from hackersdomain.com during my last post. Just thought I should let you know.
<br />

<br />
Some final thoughts are:
<br />
Is this going to be an "add-on" to Sentinel? It should....
<br />
Sentinel is great by itself, but as SpamStopper as an optional add-on, it would kick @$$. (I know you're working on more hooks into Sentinel, which is why I ask)
<br />

<br />
Well, thats really it.
<br />

<br />
Keep up the Great Work!]]></description>
            <author> no_email@example.com (Anonymous)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=2771#2771</guid>
        </item>
        <item>
            <title>I problem with banning</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=3124#3124</link>
            <description><![CDATA[Kev,
<br />
I have not forgotten about you!!
<br />
I'm trying to get work completed on the next version which will include an whitelist so the script doesn't block IP's already blacklisted in the third party blacklists.
<br />
As you know, we have no control over the thrid party blacklists the scripts uses so hopefully this will cure the banning problem.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=3124#3124</guid>
        </item>
        <item>
            <title>Fair few members getting banned ?</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4437#4437</link>
            <description><![CDATA[It isn't an 'error', that message is generated because your IP is listed as an open proxy in pre-existing blacklists.
<br />
I should add that this message does not mean you have been added to a blacklist, merely that your IP is ALREADY listed by one or more third party blacklists.
<br />

<br />
However, it is curious that if you have been using Spam Stopper for a few days or so and this is the first time 'you' have been blocked.
<br />
You may wish to review the blacklist file for words which might appear in your internal links as this would also cause this message.
<br />
It does indicate 'localkeywordblock' which normally means a blacklisted word was used in an internal url or referred url.
<br />
Do you have a gallery installed? - this is one of the blacklisted words.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4437#4437</guid>
        </item>
        <item>
            <title>Happy New Year brings a great utility</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4655#4655</link>
            <description><![CDATA[Well I finally got some tunes added and the player (top right of your screen) is only visible when logged in.
<br />
I had a nice module (FlamPlayer) which was really good for this sort of thing but it is a little overkill for my simple needs so I'm now using a simple flash image to load an xml playlist.]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4655#4655</guid>
        </item>
        <item>
            <title>Code snippet organiser</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4471#4471</link>
            <description><![CDATA[No need to apologise Sir! like most of us in this great community, we are split from here to the 12th of Never with a 'to do' list that expands by the square root of the number of items we cross off it <img src="http://www.code-authors.com/modules/Forums/images/smiles/icon_smile.gif" alt="Smile" border="0" />
<br />
No problems, it can wait a while longer <img src="http://www.code-authors.com/modules/Forums/images/smiles/icon_wink.gif" alt="Wink" border="0" />
<br />

<br />
Edited by me to correct stupid typo's - it was a long day and I was tired <img src="http://www.code-authors.com/modules/Forums/images/smiles/icon_wink.gif" alt="Wink" border="0" />]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4471#4471</guid>
        </item>
        <item>
            <title>XHTML Compliance</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=3651#3651</link>
            <description><![CDATA[I have considered building my own menu block nothing dynamic though, just basic HTML pasted into a block.]]></description>
            <author> no_email@example.com (jakec)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=3651#3651</guid>
        </item>
        <item>
            <title>phpBB 3 user handler class</title>
            <link>http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4536#4536</link>
            <description><![CDATA[http://www.phpclasses.org/browse/package/4826.html
<br />

<br />
<span style="font-weight:bold">phpbb.class.php</span>
<br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr><td><span class="genmed"><strong>Code:</strong></span></td></tr><tr><td class="code">
<br />

<br />
/*
<br />
PHPBB Forum manipulation Class
<br />
By Felix Manea &#40;felix.manea@gmail.com&#41;
<br />
www.ever.ro
<br />
Licensed under LGPL
<br />
NOTE&#58; You are required to leave this header intact.
<br />
*/
<br />
class phpbb&#123;
<br />
&nbsp; &nbsp; //various table fields
<br />
&nbsp; &nbsp; var $table_fields = array&#40;&#41;;
<br />

<br />
&nbsp; &nbsp; //constructor
<br />
&nbsp; &nbsp; public function __construct&#40;$path&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; define&#40;'IN_PHPBB', true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_root_path = $path;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpEx = 'php';
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_login
<br />
&nbsp; &nbsp; public function user_login&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //prezumtia de fail
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!defined&#40;&quot;IN_LOGIN&quot;&#41;&#41; define&#40;&quot;IN_LOGIN&quot;, true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //validate and authenticate
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $validation = login_db&#40;$phpbb_vars&#91;&quot;username&quot;&#93;, $phpbb_vars&#91;&quot;password&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;$validation&#91;'status'&#93; == 3 && $auth-&gt;login&#40;$phpbb_vars&#91;&quot;username&quot;&#93;, $phpbb_vars&#91;&quot;password&quot;&#93;&#41;&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_logout
<br />
&nbsp; &nbsp; public function user_logout&#40;&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //prezumtia de fail
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!defined&#40;&quot;IN_LOGIN&quot;&#41;&#41; define&#40;&quot;IN_LOGIN&quot;, true&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //destroy session if needed
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;$user-&gt;data&#91;'user_id'&#93; != ANONYMOUS&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_kill&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_loggedin
<br />
&nbsp; &nbsp; function user_loggedin&#40;&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;is_array&#40;$user-&gt;data&#41; && isset&#40;$user-&gt;data&#91;&quot;user_id&quot;&#93;&#41; && $user-&gt;data&#91;&quot;user_id&quot;&#93; &gt; 0&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_add
<br />
&nbsp; &nbsp; public function user_add&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //functii user
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //default user info
<br />
&nbsp; &nbsp; $user_row = array&#40;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;username&quot; =&gt; $phpbb_vars&#91;&quot;username&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_password&quot; =&gt; md5&#40;$phpbb_vars&#91;&quot;password&quot;&#93;&#41;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_email&quot; =&gt; $phpbb_vars&#91;&quot;email&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;group_id&quot; =&gt; $phpbb_vars&#91;&quot;group_id&quot;&#93;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_timezone&quot; =&gt; &quot;2.00&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_dst&quot; =&gt; 0,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_lang&quot; =&gt; &quot;ro&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_type&quot; =&gt; &quot;0&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_actkey&quot; =&gt; &quot;&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_dateformat&quot; =&gt; &quot;D M d, Y g&#58;i a&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_style&quot; =&gt; &quot;1&quot;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_regdate&quot; =&gt; time&#40;&#41;,
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user_colour&quot; =&gt; &quot;9E8DA7&quot;,
<br />
&nbsp; &nbsp; &#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //register user
<br />
&nbsp; &nbsp; if&#40;$phpbb_user_id = user_add&#40;$user_row&#41;&#41; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_delete
<br />
&nbsp; &nbsp; public function user_delete&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //delete user &#40;always returns false&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; user_delete&#40;&quot;remove&quot;, $phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_update
<br />
&nbsp; &nbsp; public function user_update&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;get_table_fields&#40;USERS_TABLE&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ignore_fields = array&#40;&quot;username&quot;, &quot;user_id&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;&quot;user_password&quot;&#93;&#41;&#41; $phpbb_vars&#91;&quot;user_password&quot;&#93; = md5&#40;$phpbb_vars&#91;&quot;user_password&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;&quot;user_newpasswd&quot;&#93;&#41;&#41; $phpbb_vars&#91;&quot;user_newpasswd&quot;&#93; = md5&#40;$phpbb_vars&#91;&quot;user_newpasswd&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $sql = &quot;&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //generate sql
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for&#40;$i = 0;$i &lt;count&gt;table_fields&#91;USERS_TABLE&#93;&#41;; $i++&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$phpbb_vars&#91;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;&#93;&#41; && !in_array&#40;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;, $ignore_fields&#41;&#41;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $sql .= &quot;, &quot;.$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;.&quot; = '&quot;.$db-&gt;sql_escape&#40;$phpbb_vars&#91;$this-&gt;table_fields&#91;USERS_TABLE&#93;&#91;$i&#93;&#93;&#41;.&quot;'&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;strlen&#40;$sql&#41; != 0&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_query&#40;&quot;UPDATE &quot;.USERS_TABLE.&quot; SET &quot;.substr&#40;$sql, 2&#41;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; //user_change_password
<br />
&nbsp; &nbsp; public function user_change_password&#40;$phpbb_vars&#41;&#123;
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //fail presumtion
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;FAIL&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //session management
<br />
&nbsp; &nbsp; $user-&gt;session_begin&#40;&#41;;
<br />
&nbsp; &nbsp; $auth-&gt;acl&#40;$user-&gt;data&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //user functions
<br />
&nbsp; &nbsp; require_once&#40;$phpbb_root_path .&quot;includes/functions_user.php&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get user_id if possible
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#41;&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;username&quot;&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_get_id_name&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;, $phpbb_vars&#91;&quot;username&quot;&#93;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if&#40;!isset&#40;$phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;&#41;&#41; return $phpbb_result;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars&#91;&quot;user_id&quot;&#93; = $phpbb_vars&#91;&quot;user_id&quot;&#93;&#91;0&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_query&#40;&quot;UPDATE &quot;.USERS_TABLE.&quot; SET user_password = '&quot;.md5&#40;$phpbb_vars&#91;&quot;password&quot;&#93;&#41;.&quot;' WHERE user_id = '&quot;.$phpbb_vars&#91;&quot;user_id&quot;&#93;.&quot;'&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = &quot;SUCCESS&quot;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $phpbb_result;
<br />
&nbsp; &nbsp; &#125;
<br />
&nbsp; &nbsp; 
<br />
&nbsp; &nbsp; private function get_table_fields&#40;$table&#41;&#123;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //if already got table fields once
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;isset&#40;$this-&gt;table_fields&#91;$table&#93;&#41;&#41; return true;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 
<br />
&nbsp; &nbsp; global $phpbb_root_path, $phpEx, $db, $config, $user, $auth, $cache, $template;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //general info
<br />
&nbsp; &nbsp; &nbsp; &nbsp; require_once&#40;$phpbb_root_path.'common.php'&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; //get table fields
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;table_fields&#91;$table&#93; = array&#40;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if&#40;!$result = $db-&gt;sql_query&#40;&quot;SHOW FIELDS FROM &quot;.$table&#41;&#41; return false;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; while&#40;$row = $db-&gt;sql_fetchrow&#40;$result&#41;&#41; $this-&gt;table_fields&#91;$table&#93;&#91;&#93; = $row&#91;&quot;Field&quot;&#93;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $db-&gt;sql_freeresult&#40;$result&#41;;
<br />

<br />
&nbsp; &nbsp; &nbsp; &nbsp; return true;
<br />
&nbsp; &nbsp; &#125;
<br />
&#125;
<br />
</td></tr></table>
<br />

<br />

<br />
<span style="font-weight:bold">example useage</span>
<br />
example.php
<br />

<br />
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr><td><span class="genmed"><strong>Code:</strong></span></td></tr><tr><td class="code">
<br />
/*
<br />
PHPBB Forum manipulation Class
<br />
By Felix Manea &#40;felix.manea@gmail.com&#41;
<br />
www.ever.ro
<br />
Licensed under LGPL
<br />
NOTE&#58; You are required to leave this header intact.
<br />
*/
<br />
//bag clasa
<br />
require_once&#40;&quot;phpbb.class.php&quot;&#41;;
<br />

<br />
$phpbb_action = @$_REQUEST&#91;&quot;op&quot;&#93;;
<br />
$phpbb = new phpbb&#40;&quot;&quot;&#41;;
<br />

<br />
switch&#40;$phpbb_action&#41;&#123;
<br />
&nbsp; &nbsp; case &quot;login&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123123&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_login&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;logout&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_logout&#40;&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;loggedin&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_loggedin&#40;&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_add&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123&quot;, &quot;email&quot; =&gt; &quot;test@test.com&quot;, &quot;group_id&quot; =&gt; &quot;2&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_add&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_delete&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_delete&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;user_update&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;, &quot;user_email&quot; =&gt; &quot;1@2.com&quot;, &quot;user_yim&quot; =&gt; &quot;my_yim&quot;, &quot;user_website&quot; =&gt; &quot;http&#58;//www.ever.ro&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_update&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&nbsp; &nbsp; case &quot;change_password&quot;&#58;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_vars = array&#40;/*&quot;user_id&quot; =&gt; &quot;53&quot;, */&quot;username&quot; =&gt; &quot;test&quot;, &quot;password&quot; =&gt; &quot;123123&quot;&#41;;
<br />
&nbsp; &nbsp; &nbsp; &nbsp; //END DATE TEST
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $phpbb_result = $phpbb-&gt;user_change_password&#40;$phpbb_vars&#41;;
<br />
&nbsp; &nbsp; break;
<br />
&#125;
<br />

<br />

<br />
if&#40;isset&#40;$phpbb_result&#41;&#41; echo $phpbb_result.&quot;&lt;br&gt;&lt;br&gt;&quot;;
<br />
?&gt;
<br />
&lt;a&gt;loggedin&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;login&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;logout&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_add&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_delete&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;user_update&lt;/a&gt;&lt;br&gt;
<br />
&lt;a&gt;change_password&lt;/a&gt;&lt;br&gt;</td></tr></table>]]></description>
            <author> no_email@example.com (Guardian)</author>
            <guid isPermaLink="false">http://www.code-authors.com/modules.php?name=Forums&amp;file=viewtopic&amp;p=4536#4536</guid>
        </item>
    </channel>
</rss>
