<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>KBPublisher Forums &#187; Topic: Error - Not enough parameters returned by remoteDoAuth function.</title>
<link>http://kbpublisher.com/forums/</link>
<description>KBPublisher Forums &#187; Topic: Error - Not enough parameters returned by remoteDoAuth function.</description>
<language>en</language>
<pubDate>Thu, 09 Feb 2012 18:20:30 +0000</pubDate>

<item>
<title>reznix on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-578</link>
<pubDate>Wed, 06 Oct 2010 15:35:32 +0000</pubDate>
<dc:creator>reznix</dc:creator>
<guid isPermaLink="false">578@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;My settings are&#60;/p&#62;
&#60;p&#62;define('KB_AUTH_AREA', 2);&#60;br /&#62;
define('KB_AUTH_LOCAL', 2);&#60;br /&#62;
define('KB_AUTH_LOCAL_IP', '127.0.0.1-127.0.0.3); - I also added some of our internal IP's to allow the admin login&#60;br /&#62;
define('KB_AUTH_TYPE', 1);&#60;br /&#62;
define('KB_AUTH_REFRESH_TIME', 0); //3600*24*30  - We decided not to update the account info as it is only the name and email fields, which don't change that often. AD Password changes do not seem to be affected.&#60;/p&#62;
&#60;p&#62;The imported_user_id field is in the kbp_user table which you can see in phpmyadmin.
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-577</link>
<pubDate>Wed, 06 Oct 2010 06:18:53 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">577@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Thank you Reznix! I receive the following error whenever I try to logon a second time:&#60;/p&#62;
&#60;p&#62;1062: Duplicate entry '7181504180907210526' for key 'imported_user_id'&#60;/p&#62;
&#60;p&#62;How do you have your KB_AUTH settings defined?  It seems as though it is trying to recreate the user upon logon.  Any tips?  It seems that we are finally getting close to a workable solution for my orginization.  Thanks in advance.&#60;/p&#62;
&#60;p&#62;My settings are as follows:&#60;/p&#62;
&#60;p&#62;define('KB_AUTH_AREA', 2);&#60;br /&#62;
define('KB_AUTH_LOCAL', 0);&#60;br /&#62;
define('KB_AUTH_LOCAL_IP', '127.0.0.1-127.0.0.3;208.34.45.1');&#60;br /&#62;
define('KB_AUTH_TYPE', 1); I changed this to &#34;0&#34; and it still produced the same error.&#60;br /&#62;
define('KB_AUTH_REFRESH_TIME', 1); //3600*24*30
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-576</link>
<pubDate>Wed, 06 Oct 2010 04:30:20 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">576@http://kbpublisher.com/forums/</guid>
<description>&#60;br /&#62;</description>
</item>
<item>
<title>reznix on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-575</link>
<pubDate>Wed, 06 Oct 2010 03:59:28 +0000</pubDate>
<dc:creator>reznix</dc:creator>
<guid isPermaLink="false">575@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;We were able to get remotedoauth to work with adLDAP using the following code. Please keep in mind I'm not a programmer so I can not say if this is the proper way of going about it. This does populate the desired values and we used the employeeid field in AD because it is usually a unique numerical value. It MUST be filled in and cannot be blank before it will work. When we tried the $user['remote_user_id'] = 1, a new user login would overwrite another user or would error out.&#60;/p&#62;
&#60;p&#62;function remoteDoAuth($username, $password) {&#60;/p&#62;
&#60;p&#62;require_once 'custom/adLDAP.php';&#60;/p&#62;
&#60;p&#62;$auth = false;&#60;br /&#62;
oif(empty($username) &#124;&#124; empty($password)) {&#60;br /&#62;
oreturn $auth;&#60;br /&#62;
o}&#60;/p&#62;
&#60;p&#62;$username = addslashes($username);&#60;br /&#62;
o$password = addslashes($password);&#60;/p&#62;
&#60;p&#62;//create the AD LDAP connection&#60;br /&#62;
o$adldap = new adLDAP();&#60;/p&#62;
&#60;p&#62;// if found&#60;br /&#62;
oif($adldap-&#38;gt;authenticate($username, $password)){&#60;br /&#62;
o// remote_user_id is a unique id for user in your system (integer)&#60;/p&#62;
&#60;p&#62;// get user info&#60;br /&#62;
$userinfo = $adldap-&#38;gt;user_info($username, array(&#34;sn&#34;,&#34;givenname&#34;,&#34;mail&#34;,&#34;employeeid&#34;));&#60;/p&#62;
&#60;p&#62;ame'] = $userinfo[0]['givenname'][0];&#60;br /&#62;
o$user['last_name'] = $userinfo[0]['sn'][0];&#60;br /&#62;
o$user['email'] = $userinfo[0]['mail'][0];&#60;br /&#62;
o$user['username'] = $username;&#60;br /&#62;
o$user['password'] = $password;&#60;br /&#62;
o$user['remote_user_id'] = $userinfo[0]['employeeid'][0];&#60;/p&#62;
&#60;p&#62; a priv to user (optional)&#60;br /&#62;
o// it is fully up to you how to determine who is authenticated and what priv to &#60;/p&#62;
&#60;p&#62;assign&#60;br /&#62;
o$user['priv_id'] = 3;&#60;/p&#62;
&#60;p&#62; a role to user (optional)&#60;br /&#62;
o// it is fully up to you how to determine who is authenticated and what role to &#60;/p&#62;
&#60;p&#62;assign&#60;br /&#62;
o$user['role_id'] = 1;&#60;br /&#62;
o}&#60;/p&#62;
&#60;p&#62;return $user;&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;&#60;/p&#62;
&#60;p&#62;Hope this saves someone else some time and effort.
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-555</link>
<pubDate>Fri, 09 Jul 2010 06:59:09 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">555@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;What error you have? &#34;Error Not enough parameters returned by remoteDoAuth function.&#34; ?&#60;br /&#62;
See this post please, all explained here.
&#60;/p&#62;</description>
</item>
<item>
<title>guaranteedseo on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-554</link>
<pubDate>Sun, 04 Jul 2010 22:05:15 +0000</pubDate>
<dc:creator>guaranteedseo</dc:creator>
<guid isPermaLink="false">554@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;I get same error, is this issue solved ?
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-434</link>
<pubDate>Mon, 26 Oct 2009 20:42:26 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">434@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Awesome! That seemed to work.  How would you go about pulling the first_name, last_name and email from LDAP and populate the forms?  I know this is probably more of an ADLDAP question but I figured I would ask here.
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-433</link>
<pubDate>Mon, 26 Oct 2009 18:22:13 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">433@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Database error!&#60;br /&#62;
1366: Incorrect integer value: 'username' for column 'imported_user_id' at row 1&#60;/p&#62;
&#60;p&#62;imported_user_id should be integer (number) it should be unique from your system&#60;br /&#62;
not just any number. User data will be updated depends on this value.&#60;/p&#62;
&#60;p&#62;$user['remote_user_id'] = 1;
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-432</link>
<pubDate>Mon, 26 Oct 2009 14:01:42 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">432@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;It is almost like I need a combonation of the two.  The second method &#34;// Example of using adLDAP - LDAP Authentication with PHP for Active Directory &#34; works just fine.  The problem is I would like it to create a unique user based off the AD username upon logon.&#60;/p&#62;
&#60;p&#62;Do you have an example of LDAP Authentican with PHP for Active Directory that creates a unique user upon logon?&#60;/p&#62;
&#60;p&#62;When I used the following code I received an error:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function remoteDoAuth($username, $password) {

orequire_once &#38;#39;custom/adLDAP.php&#38;#39;;

o$auth = false;
oif(empty($username) &#124;&#124; empty($password)) {
oreturn $auth;
o}

o$username = addslashes($username);
o$password = addslashes($password);

o//create the AD LDAP connection
o$adldap = new adLDAP();

o// if found
oif($adldap-&#38;gt;authenticate($username, $password)){
o// remote_user_id is a unique id for user in your system (integer)
o$user[&#38;#39;first_name&#38;#39;] = $username;
o$user[&#38;#39;last_name&#38;#39;] = $username;
o$user[&#38;#39;email&#38;#39;] = &#38;#39;test@test.com&#38;#39;;
o$user[&#38;#39;username&#38;#39;] = $username;
o$user[&#38;#39;password&#38;#39;] = $password;
o$user[&#38;#39;remote_user_id&#38;#39;] = $username;

o// assign a priv to user (optional)
o// it is fully up to you how to determine who is authenticated and what priv to assign
o$user[&#38;#39;priv_id&#38;#39;] = 3;

o// assign a role to user (optional)
o// it is fully up to you how to determine who is authenticated and what role to assign
o$user[&#38;#39;role_id&#38;#39;] = 1;
o}

oreturn $user;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Database error!&#60;br /&#62;
1366: Incorrect integer value: 'username' for column 'imported_user_id' at row 1&#60;/p&#62;
&#60;p&#62;We are authenticating against LDAP but it's not creating the user.
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-431</link>
<pubDate>Mon, 26 Oct 2009 10:01:32 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">431@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;&#34;Not enough parameters returned by remoteDoAuth function&#34; means&#60;br /&#62;
what it said, your function should return associative array with keys:&#60;/p&#62;
&#60;p&#62;first_name&#60;br /&#62;
last_name&#60;br /&#62;
email&#60;br /&#62;
username&#60;br /&#62;
password-- as the user types when they login, that is, not encrypted&#60;br /&#62;
remote_user_id -- a unique userID stored in your system, integer&#60;br /&#62;
role_id - (optional)&#60;br /&#62;
priv_id - (optional) privilege for user. If user has a privilege, he will have access to Admin Area&#60;/p&#62;
&#60;p&#62;Please read these articles&#60;br /&#62;
&#60;a href=&#34;http://www.kbpublisher.com/kb/Using-Remote-Authentication_181.html&#34; rel=&#34;nofollow&#34;&#62;http://www.kbpublisher.com/kb/Using-Remote-Authentication_181.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Please see this example&#60;br /&#62;
&#60;a href=&#34;http://www.kbpublisher.com/kb/download/19/&#34; rel=&#34;nofollow&#34;&#62;http://www.kbpublisher.com/kb/download/19/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-430</link>
<pubDate>Sun, 25 Oct 2009 08:05:27 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">430@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Here is the remoteDoAuth function.  I would like a new account created upon logon utilizing the sAMAccountName as the username. What fields are required? When I try other remoteDoAuth functions I get other errors.&#60;/p&#62;
&#60;p&#62;function remoteDoAuth($username, $password) {&#60;br /&#62;
orequire_once 'custom/adLDAP.php';&#60;/p&#62;
&#60;p&#62;$auth = false;    if(empty($username) &#124;&#124; empty($password)) {&#60;br /&#62;
oreturn $auth;&#60;br /&#62;
o}   &#60;/p&#62;
&#60;p&#62;nection&#60;br /&#62;
o$adldap = new adLDAP();        &#60;/p&#62;
&#60;p&#62;d&#60;br /&#62;
oif($adldap-&#38;gt;authenticate($username, $password)){&#60;br /&#62;
o$user = 4; // assign a user id, this user id should exist in kb user table&#60;br /&#62;
o}        &#60;/p&#62;
&#60;p&#62; $user;&#60;br /&#62;
}
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-429</link>
<pubDate>Sun, 25 Oct 2009 07:42:56 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">429@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Please send us your remoteDoAuth function.
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-428</link>
<pubDate>Sat, 24 Oct 2009 05:16:32 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">428@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Ok, so after combing over my settings in remote_auth.php, config.inc.php, and adLDAP.php it looks like I am finally getting somewhere.  In remote_auth.php when KB_AUTH_TYPE = 1 i get the following error:&#60;/p&#62;
&#60;p&#62;&#34;Error Not enough parameters returned by remoteDoAuth function.&#34; &#60;/p&#62;
&#60;p&#62; However, when it is set to KB_AUTH_TYPE = 2 I seem to be authenticating against the LDAP database.  The problem is the user is logged in as the admin account and displays the admin username!  Regardless of the user that logs in they display the admins login name and have full admin area access&#60;/p&#62;
&#60;p&#62;Does KBPublisher create the user upon login after successful authentication?  Or do you create a general user account and assign $user = in remote_auth.php to the general account?&#60;/p&#62;
&#60;p&#62;After two months of trying I am at my wits end!  I have purchased a license and love the product but LDAP is necessary for full integration into our company.  Does KBPublisher offer paid support?
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-405</link>
<pubDate>Sun, 23 Aug 2009 08:10:44 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">405@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;&#60;a href=&#34;http://www.kbpublisher.com/kb/Different-ways-for-Remote-Authentication_183.html&#34; rel=&#34;nofollow&#34;&#62;http://www.kbpublisher.com/kb/Different-ways-for-Remote-Authentication_183.html&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-404</link>
<pubDate>Sun, 23 Aug 2009 08:09:41 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">404@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Remote Authentication is a bit tricky, you should understand how it works.&#60;/p&#62;
&#60;p&#62;Adding/refreshing remote user data to KB and authenticate user&#60;/p&#62;
&#60;p&#62;KB_AUTH_TYPE = 1&#60;/p&#62;
&#60;p&#62;On success, the authentication function remoteDoAuth should return an associative array with the following keys:&#60;/p&#62;
&#60;p&#62;first_name&#60;br /&#62;
last_name&#60;br /&#62;
email&#60;br /&#62;
username&#60;br /&#62;
password-- as the user types when they login, that is, not encrypted&#60;br /&#62;
remote_user_id -- a unique userID stored in your system, integer&#60;br /&#62;
role_id - (optional)&#60;br /&#62;
priv_id - (optional) privilege for user. If user has a privilege, he will have access to Admin Area&#60;/p&#62;
&#60;p&#62;Authentication by existing KBPublisher user&#60;/p&#62;
&#60;p&#62;KB_AUTH_TYPE = 2&#60;/p&#62;
&#60;p&#62;On success, the authentication function remoteDoAuth should return the user_id of the user in the KBPublisher USER table or an associative array with keys (user_id, username), for example: array('user_id'=&#38;gt;7, 'username'=&#38;gt;'Test').
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-403</link>
<pubDate>Sat, 22 Aug 2009 18:02:03 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">403@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Does that still apply when working with PHP for Active Directory?  Here are the complete contents of my remote_auth.php file.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
define('KB_AUTH_LOCAL', 2); // returning exiting kb user&#60;/p&#62;
&#60;p&#62;function remoteDoAuth($username, $password) {&#60;/p&#62;
&#60;p&#62;require_once 'custom/adLDAP.php';&#60;/p&#62;
&#60;p&#62;$auth = false;&#60;br /&#62;
oif(empty($username) &#124;&#124; empty($password)) {&#60;br /&#62;
oreturn $auth;&#60;br /&#62;
o}&#60;/p&#62;
&#60;p&#62;$username = addslashes($username);&#60;br /&#62;
o$password = addslashes($password);&#60;/p&#62;
&#60;p&#62;//create the AD LDAP connection&#60;br /&#62;
o$adldap = new adLDAP();&#60;/p&#62;
&#60;p&#62;// if found&#60;br /&#62;
oif($adldap-&#38;gt;authenticate($username, $password)){&#60;br /&#62;
o$user = 1; // assign a user id, this user id should exists in kb user table&#60;br /&#62;
o}&#60;/p&#62;
&#60;p&#62;return $user;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;&#60;/code&#62;&#60;br /&#62;
I am supposed to add additional information to the function?&#60;/p&#62;
&#60;p&#62;I have _account_suffix, _base_dn, and _domain_controllers set correctly in adldap.
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-400</link>
<pubDate>Sat, 22 Aug 2009 10:06:59 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">400@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;&#34;Not enough parameters returned by remoteDoAuth function&#34; means&#60;br /&#62;
what it said, your function should return associative array with keys:&#60;/p&#62;
&#60;p&#62;first_name&#60;br /&#62;
last_name&#60;br /&#62;
email&#60;br /&#62;
username&#60;br /&#62;
password-- as the user types when they login, that is, not encrypted&#60;br /&#62;
remote_user_id -- a unique userID stored in your system, integer&#60;br /&#62;
role_id - (optional)&#60;br /&#62;
priv_id - (optional) privilege for user. If user has a privilege, he will have access to Admin Area&#60;/p&#62;
&#60;p&#62;Please read these articles&#60;br /&#62;
&#60;a href=&#34;http://www.kbpublisher.com/kb/Using-Remote-Authentication_181.html&#34; rel=&#34;nofollow&#34;&#62;http://www.kbpublisher.com/kb/Using-Remote-Authentication_181.html&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>gmrstudios on "Error - Not enough parameters returned by remoteDoAuth function."</title>
<link>http://kbpublisher.com/forums/topic.php?id=131#post-396</link>
<pubDate>Thu, 20 Aug 2009 05:36:57 +0000</pubDate>
<dc:creator>gmrstudios</dc:creator>
<guid isPermaLink="false">396@http://kbpublisher.com/forums/</guid>
<description>&#60;p&#62;I am receiving the following errors when trying to authenticate via LDAP.:&#60;/p&#62;
&#60;p&#62;Error - Not enough parameters returned by remoteDoAuth function and Error Not enough parameters returned by remoteDoAuth function&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;When I use the first function shown in remote_authldap.php.txt I get:&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;&#34;Login failed! Wrong username and/or password&#34;&#60;/strong&#62;
&#60;/p&#62;&#60;/blockquote&#62;
&#60;blockquote&#62;&#60;p&#62;When I use the second function show in remote_authldap.php.txt I get:&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;&#34;Error Not enough parameters returned by remoteDoAuth function.&#34;&#60;/strong&#62;
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I would assume the bind is going off without a hitch because it is not returning errors. I have triple checked my settings and everything looks to be in order.&#60;/p&#62;
&#60;p&#62;Any help you could give on solving this would be greatly appreciated.
&#60;/p&#62;</description>
</item>

</channel>
</rss>

