Wondering if Component to add additional User Types is in development.

Christina Emerson Posted in Component Development 5 years ago

Hello I was wondering if there was anything in development now to create additional user types beyond "Normal" and "admin"? I am looking to add additional user types but wanted to ask before going down the road of building this component?

The use case for the additional user types would be to only show certain content or pages to premium members.

thanks in advance.

Replies
us Rishi B Replied 5 years ago

yeah, you could do something like what Z-Man suggested. Another idea would be to have a look at how Admin users are handled and try to replicate some of that functionality. For example, you will very often see the line: if (ossn_isAdminLoggedin()) { in ossn's php source, which will display different content when an admin is logged in (for example, a link, or a delete button, or whatever). I think you could do something similar with "premium" members. One idea would be to add a field specifying that this a premium post, and then displaying it accordingly through the OssnWall component. Wall posts are stored as JSON objects in the ossn_object table (don't worry Arsalan, I'm not suggesting anyone run any direct queries, just explaining the database schema). You could add another field to the JSON object which specifies that it's a premium post, and then use OssnWall to display it (or not) in the manner you wish. Z-Man's workaround solution would certainly be easier, though. A LOT easier, haha.

German Michael Zülsdorff Replied 5 years ago

I have my doubts that these components are of any help in your case, since
a) User categories have no impact on content reading
b) Site Moderators will add some more write permissions to a member but no read restrictions to the others

A way which comes much closer to what you wanted could be:
1. Choose Configure->OssnWall from your Ossn Admin panel and select "Friends posts only"
2. Add a dummy member (let's name him Mr. Premium) to your community

Mr. Premium may add posts now
Mr. Premium may add photo albums now - set to "Friends only"

None of your regular members can see any content of Mr. Premium so far

Ask your members to pay a fee ... whatever ... and send a friend request to Mr. Premium
After receiving the payment, log in as Mr. Premium and confirm the friend request(s).
And any friends of Mr. Premium can see his content now.

us Christina Emerson Replied 5 years ago

oh perfect I'll check it out this will at least get me a step closer. thanks for pointing these out.

us Rishi B Replied 5 years ago

also, there's this other premium component: https://www.softlab24.com/product/view/37/user-categories but I don't think that does exactly what you want either... not too far off, though.

us Rishi B Replied 5 years ago

this premium component isn't exactly what you want, but it does add a third type of user ("moderator"): https://www.softlab24.com/product/view/4390/site-moderators