mardi 31 octobre 2017

Elgg and the utilization of Relationship_created_time_lower

Finishing of my elgg plugin has come to some issues, after fixing my last question I have encountered another. Apperently I am misusing or misunderstanding the use of the Created time lower and upper functions in Elgg

With the code below:

    $monthSpan = (30 * 24 * 60 * 60);
$startTime = time() - $monthSpan;

$MemberDifference = elgg_get_entities_from_relationship(array(
    'relationship' => 'member', //get Members
    'relationship_guid' => $group->guid, //get individual guid for use
    'inverse_relationship' => true,
    'type' => 'user', //users are returned
    'limit' => 20,
    'joins' => array("JOIN {$db_prefix}users_entity u ON e.guid=u.guid"),
    'order_by' => 'u.name ASC',
    'relationship_created_time_lower' => $startTime, //the furthest back it will reach
    'relationship_created_time_upper' => time(), //possibly unneeded, but ensures the closest date is today
    'count' => true,
));

Using this function, I built it upon my way to get all of the members in the associated group, theoretically it should now grab any members that registered to that group within the last month. Unfortunately, it instead continues to grab every member in the group, regardless of the time they joined.

Does anyone have any information into where I have went wrong?




Aucun commentaire:

Enregistrer un commentaire