About getUserProfiles

Snippet to get formatted user profile information and return Resources created by a specified author. Also includes an output modifier that generates the gravatarUrl from an email address.

More info: http://www.sepiariver.ca/blog/modx-web/modx-snippet-to-get-user-profiles-and-gravatar

Information

Released
December 1, 2013

Supported Database
MySQL

License
GPLv2

Supported Versions
2.2 - Current

Downloads
2,093

Instructions

---------------------------- USAGE ---------------------------- 

To use getResourcesAuthor snippet: ---------------------------------- Example: http://yourdomain.com?author=2

If [[!getResourcesAuthor? ... ]] was called (uncached) on the page, the above request would return Resources created by MODX User ID 2. All getResources properties, including &where, can be used. getResourcesAuthor simply runs getResources. Can be used with getPage.

To use getUserProfiles snippet:

[[getUserProfiles]] Prints an array of up to 5 active users' profiles

[[getUserProfiles?group=1&showInactive=1&limit=20&tpl=myUserTpl]] Where [[$myUserTpl]] contains: [[+id]]<br> [[+name]]<br> [[+email]]<br> [[+phone]]<br> [[+mobilephone]]<br> [[+comment]]<br> [[+website]]<br> [[+extended.attribute1]]<br> [[+extended.attribute2]]<br>... Outputs formatted user profile information for up to 20 users from User Group ID 1, regardless of active state

Note: the value passed to [[+website]] is stripped of url scheme for consistency, so you must prefix with a valid scheme for links to work. Example: <a href="//[[+website]]">

To use gravatarUrl output modifier:

<img src="[[+email:gravatarUrl]]" alt="gravatar"> Where [[+email]] is a valid email address the above will generate the gravatar URL for the img src 

For more info: http://www.sepiariver.ca/blog/modx-web/modx-snippet-to-get-user-profiles-and-gravatar

New in 1.1.0-beta1

1.1.0-beta1 Dec.1,2013 Added getResourcesAuthor snippet.

1.0.0-beta1 Initial beta release.

Current releases

1.1.0-beta1
View | Download
December 1, 2013
2.2 - Current