Developer forum

Forum » Development » Frontend: Extend Usermangement w. member-of-groups

Frontend: Extend Usermangement w. member-of-groups

Morten S. Hvid
Reply
Hi,

For some reason the list/loop of users in a group (frontend), dosent contain data/loop with groups the user are member of.
How can I extend my template with this loop/data?

SU. ASAP ;)

/Morten


Replies

 
Nicolai Høeg Pedersen
Reply

Create a Dynamicweb.Modules.UserManagement.UserTemplateExtender

http://developer.dynamicweb-cms.com/Files/Filer/Documentation/Development/Modules/(en-US)%20User%20Management%20Extensibility%20API.pdf

http://developer.dynamicweb-cms.com/api/modules/?Dynamicweb~Dynamicweb.Modules.UserManagement_namespace.html

 
Nicolai Høeg Pedersen
Reply
Ooops...

That template extender is not released - valid from DW 8.0.

So right now you cannot extend that.

 
Morten S. Hvid
Reply

Damn ... its easily done with a custom module and some SQL. But in this case we need to reuse the sorting of the users in the group. The sorting is stored as "xml" (text) in the database on each user!?.

This makes it really hard to sort on without using DW. So it would be nice to use the current DW module and just add the group-ids of each user.

But even this isnt possible or?


 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer
You can use User.GetUsersBySql with your own SQL. That will return a usercollection with the sort loaded - and then sort using usercollection.SortBy method...
Votes for this answer: 0
 
Morten S. Hvid
Reply
Sweet - thanks :)

 

You must be logged in to post in the forum