Wrong user album was found in embeded mambo

superbird

Joined: 2005-05-11
Posts: 5
Posted: Thu, 2005-05-12 15:24

Hi,

Wrong user album was found.

mambo 4.5.2
G2 cvs 5/10/05

When usealbum was configured to create album automatically, wrong user album was found.

User's "full name" was used to create user album. Since the "full name" is not unique and can be edited in mambo, the following comparison code in com_gallery2/gallery2/galler2.php may produce incorrect result. I have a situation when user's full name is empty, it can not find the correct album. We should compare the owner's id of the album with the user id.

$found_album = false;
foreach ($items as $child)
{
if (strcasecmp($child->getTitle(), $my->username)==0)
{
// Yes, they have an album
$found_album = true;
break;
}
}