﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty
2632	Documentation incorrect for get_metadata_byname	dannyl	cash	"It seems that under some conditions the metadata does not update.
See the below code - when we initially increment the metadata it's good. Then when we increment a counter and reset the metadata the update does not happen.

$n = get_metadata_byname($user_guid, 'unread');
$user = get_entity($user_guid);
    >> $user->unread = n = 

if (!$n) {
    $user->unread = 0;
    $n = 0;
     >> $user->unread = 0 n = 0
}
$n += 1;

$user->unread = $n;

>> $user->unread = 0 n = 1"	Defect	closed	normal	Elgg 1.7.5	Core	1.7	minor	fixed		brettp	trivial
