4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: V@no on September 15, 2008, 05:29:47 AM

Title: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: V@no on September 15, 2008, 05:29:47 AM
This bug doesn't affect 4images itself, only possibly some MODs.

$additinal_user_fields array not being used for guests, and $user_info array will contain only default 4images fields, which might through out warning messages in some MODs.

The fix is simple:
in includes/sessions.php find:

    return $user_info;


Insert ABOVE:
    global $additional_user_fields;
    foreach ($additional_user_fields as $key => $val)
    {
      if (!isset($user_info[$key]))
      {
        $user_info[$key] = "";
      }
    }
Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: mawenzi on September 15, 2008, 10:26:53 AM
... thanks for sharing this fix ...
... but now there is the following error message ...
Code: [Select]
Warning: Invalid argument supplied for foreach() in /usr/export/www/.../includes/sessions.php on line ...
Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: V@no on September 15, 2008, 02:35:44 PM
Ops...forgot add global.
Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: mawenzi on September 16, 2008, 01:36:17 PM
... ok ... now it is perfect ...
... thanks again ...
Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: hannes61 on November 06, 2008, 08:32:24 AM
Solves this the problem for the detailed view, where it is possible to add
comments to an image without filling the spam check?


Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: V@no on November 06, 2008, 09:03:19 AM
Welcome to 4images forum.
Open global.php and change to 0 where you don't want have captcha:
Code: [Select]
$captcha_enable              = 1;
$captcha_enable_comments     = 1;
$captcha_enable_upload       = 1;
$captcha_enable_registration = 1;
$captcha_enable_postcards    = 1;
Title: Re: [1.7 - 1.7.6] Additional user fields not being used for guests
Post by: hannes61 on November 06, 2008, 11:09:47 AM
Thanks.

Now I know more about, where to change settings for CAPTCHA.
Only Big Chars, ... :)

But I had the case, that i could add comments without filling the CAPTCHA field,
even when  it was displayed.  :roll:

But now it seems to work. Only comments can be send when the field  is filled.

Thanks again, Hannes