I was hoping a simple solution would have been out there for this, but after sometime searching nothing came up.
Has anyone seen a simple way to get the total number of resources published by a user?
I was hoping a simple solution would have been out there for this, but after sometime searching nothing came up.
Has anyone seen a simple way to get the total number of resources published by a user?
Just write your own snippet.
Something like this may work:
<?php
$user_id = 1;
$c = $modx->newQuery('modResource');
$c->where([
'published' => '1',
'deleted' => '0',
'publishedby' => $user_id //or maybe use createdby or editedby
]);
return $modx->getCount('modResource', $c);
You probably have to tweak the code to your specific needs.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.
Perfect, than you for your help!