[horde] Re: user registation with horde

alan walters alan at aillweecave.ie
Tue Oct 26 13:10:33 PDT 2004


if (!function_exists('_horde_hook_signup_addextra')) {

function _horde_hook_signup_addextra($userID, $extra)

{

global $conf;

require_once 'DB.php';

$_db = &DB::connect($conf['sql'], true);

$fields = array();

$values = array();

foreach ($extra as $field => $value) {

$fields[] = 'object_' . String::lower($field);

$values[] = $_db->quote(String::convertCharset($value, NLS::getCharset(),
$conf['sql']['charset']));

}

$fields[] = 'object_id';

$values[] = $_db->quote($userID);

$query = 'INSERT INTO radiowave_clients ( owner_id, ' . implode(', ',
$fields) . ')';

$query .= ' VALUES ( \'admin\', ' . implode(', ', $values) . ')';

$result = $_db->query($query);

return DB::isError($result) ? $result : true;

}

}

thanks i found the bit that it applies to. i see the first section of
_horde_hook_signup_getextra  displays the fields and just have this in now
but the bit that is failing with a db connect erroris the above example
code.what would  the recommended proceedure be here for placing new users in
to the above table(which is a renamed turba database(note:the table works as
a shared address book at the moment)

"Jan Schneider" <jan at horde.org> wrote in message
news:20041026104255.p07etmv074og8ows at jan.dip.ammma.net...
> Zitat von alan walters <alan at aillweecave.ie>:
>
>> from what i understand of the user registration feature is that it sends
>> a
>> tag to the admin (which is working) and then the admin accepts or rejects
>> it(which is also working) after this the user gets added but the
>> additional
>> data that the user has added gets dumped.(with a db error)
>
> Without you giving us the exact error message, we can't help a lot.
>
>> On looking at the issue it seems hat this additional data should update
>> into
>> the turba address book(is this correct) the address book is set to write
>> and
>> read for all users
>
> The function that gets triggered after approving the signup is
> _horde_hook_signup_addextra(). The function in hooks.php.dist is only an
> example, you have to customize to your needs.
>
> Jan.
>
> -- 
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
> -- 
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.783 / Virus Database: 529 - Release Date: 10/25/2004







More information about the horde mailing list