Jump to content

Multiple accounts + forum integration


chadamas
 Share

Recommended Posts

Hello again, ProcessWire gurus! 

I'm getting started on a new project, which I really want to build on ProcessWire, but it has some unique considerations and I'm having trouble wrapping my head around a few key details that will ensure that it grows from a solid foundation. I can provide additional details, if you'd like, but here's the gist: 

  1. Users create a "master" account upon registration (I'm thinking simply an e-mail address, username, and password).
  2. Users can create up to three sub-accounts. 
  3. Users can switch between all linked accounts--including the master account--without logging out/back in.
  4. (Here's where it gets fuzzy for me.) The currently-active account should be able to access our forum, create topics, and post replies, independent of the other associated accounts. 

I've attempted to approach this from a number of different directions and keep encountering roadblocks, so I'm hoping someone here has some ideas. Maybe even a forum suggestion that would work well with these requirements as they relate to ProcessWire. I'd love to use Luna, but haven't had much luck there. I could use SMF, but I built an entire website on that previously and am afraid that I'll end up abandoning PW completely (and that my code will suffer and become less-maintainable as a result). Beyond that, my shortlist so far consists of Codoforum (which looks fairly promising) and Vanilla.

Honestly...this is just hard to wrap my head around. I have read many, many discussions on ProcessWire + forum integration, and I 100% understand and appreciate the difficulties and nuances of making a website more community-focused, but...how would you approach this task? If you have any thoughts, ideas, or suggestions, I'd love to hear from you.

Thank you very much in advance!

Link to comment
Share on other sites

Interesting ideas. I think I would probably allow the subaccounts be properties/fields of the master account that are required to be unique. Maybe create a template for subaccounts and have a select option for specific privileges. Then, based on the page being visited, the appropriate sub-account can be retrieved and the privileges set accordingly. That allows a way to determine which sub-account is being used and if a post is created, can use the appropriate account name associated with the master account. In conjunction with clsource's suggestion for a decent REST api, I don't think it would be too difficult.

  • Like 2
Link to comment
Share on other sites

My. Goodness. I find new reasons to love ProcessWire every time I use it.

Wordsworth had it right when he said "To begin, begin." (And Ryan Cramer had it right when he began building this beautiful system/framework.)

Anyway, back to the topic at hand: I decided to stop overthinking it and just try something. Admittedly, I have a long way to go and I'm sure that I'll encounter more than a few problems, but I think this is actually off to a decent start. 

I'll probably be back for more help, but I really appreciate your advice, clsource and MindFull. 

If I manage to get this off the ground the way it was envisioned, I'll try to come back here and provide some additional details in case it will be beneficial for others...but in the meantime, I'll say that I began by taking a step back and remembering that in ProcessWire, everything is a page. Which means that even user accounts can have child pages if you "Show system templates" on the Templates page and allow it. From there, I selected which template was allowed for children (after creating said template, of course). With that, and the fact that ProcessWire's API allows you to easily manipulate sessions, I was off.

If anyone has done this before (allowing subpages for users) and has any additional insight or considerations, please let me know.

Thanks again!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...