Search code examples
modx

MODX - Getresources created by logged in user


  • MODX Revolution 2.2.5-pl
    • getresources
    • Newspublisher

Wondering whether it is possible to show the resources that belong to the current logged in user.

The idea is to have a option in the users profile, to list of all resources created by him.

thanks


Solution

  • You need a filter of resources by createdby field, for example:

    [[!getResources? 
        &parents=`[[*id]]` 
        &where=`{"createdby:=":[[!+modx.user.id]]}` 
        &tpl=`myRowTpl`
    ]]