Skip to content

Commit a8d561b

Browse files
author
rvelices
committed
correct bug in commit r3622 ( feature 1053 )
git-svn-id: http://piwigo.org/svn/trunk@3640 68402e56-0260-453c-a942-63ccdbb3a9ee
1 parent cef0550 commit a8d561b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/functions_user.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ function getuserdata($user_id, $use_cache)
332332
if ( !is_admin($userdata['status']) )
333333
{ // for non admins we forbid categories with no image (feature 1053)
334334
$forbidden_ids = array();
335-
foreach ($user_cache_cats as $cat_id => $cat)
335+
foreach ($user_cache_cats as $cat)
336336
{
337337
if ($cat['count_images']==0)
338338
{
339-
array_push($forbidden_ids, $cat_id);
340-
unset( $user_cache_cats[$cat_id] );
339+
array_push($forbidden_ids, $cat['cat_id']);
340+
unset( $user_cache_cats[$cat['cat_id']] );
341341
}
342342
}
343343
if ( !empty($forbidden_ids) )

0 commit comments

Comments
 (0)