This line doesn't return an object:
$res = $GLOBALS['fc_config']['cms']->getUsers();
It can be easily "fixed" so it doesn't issue a fatal error with:
if ($res instanceof Traversable)
while ($rec = $res->next())
$ret[$rec['id']] = $rec;
This data looks like $rec is supposed to be a type of ArrayObject. At minimum it has to implement both Iterator (or a subclass) as well as ArrayAccess to be used as you have it here.
While this will fix the error you'll end up with nothing in $ret. $res must be either an array as specified here, or an object to use that while, so use
else if ($res instanceof Traversable)
instead. Null can be checked against an instanceof operation as well without triggering an error.
Actually, this cannot be a Traversable type. next() doesn't return an object according to the iterator API, so that would be done with:
Or just using a foreach.
$cur = $obj->current();