Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dantreacy's avatar

Photographer/User Model structure

Hi Folks,

I'm after some thoughts/assistance regarding the best way the structure the site I'm working on.

In short it's a community site where authorised members (call them Posters) of the community are able to posts photos of events the community holds. However one of the main reasons for the site is to act as something of an archive for older photos, especially from users who are both no longer active on the site, and more importantly were active before the community even had a site (and thus no accounts etc)

We have senior members of the site (call them Curators) who are authorised (and encouraged) to post photos from these non-active "legacy" community members (call them Photographers).

The curators and posters are obviously standard user models that can be handled by some type of role system. That's not at issue at all. It's how to handle the older "never existed in the current (or any) system" users and relatively smoothly integrate that into the site so the users can treat them exactly the same when browsing/searching etc..

On of the main goals of the site is we want people to be able to search for the older photos based on both the event and in many cases on who took them. Some of these photographers are well regarded within the community and we want to give them the credit they deserve and protect their legacy.

Obviously this wouldn't be a problem if the people who took the photos were either still users or were ever users but for some of the older photos, they pre-date any form of site. It also wouldn't be an issue if there were only a handful of "photographers" who could be added manually as some form of dummy user. However at latest count the number is at 300 and growing, some have a handful of photos from a single event others have huge libraries spanning many years of the group's history that the curators are working through.

My initial thought was some type of Photographer Model alongside the standard User model (that would be used for the Posters posting their photos) which makes it easy to deal with the non-active Photographers but makes it seem a lot more complicated for how to deal with the current active posters.

What we need to be able to do is relatively simple and standard

  • List all recently posted photos both legacy and current
  • Separately list only legacy and only current photos
  • Enable searching all photos by legacy photographer name
  • List all photos by certain photographer whether legacy or current.

As you can see, it's not hugely complicated stuff. I'm just trying to work out the best (and most efficient, as due to the nature of the site it will only grow in size) way to handle both the separate listing and the combined listings and having some way to link the old pics to some type of "user" (virtual or otherwise) so they can easily be listed and search etc.

I'm certain this isn't the first time someone has come across something like this it's just not something I've ever come up against and whilst I have a handful of options for solving it. I'm honestly not sure what's the best way moving forward that won't hamstring the site as it grows.

Apologies for the wall text and hopefully I've explained what I'm after clearly.

Any help greatly appreciated. :)

0 likes
5 replies
jlrdw's avatar

I once also had a non profit that I dealt with, I put older articles, events, images in PDF's and had links to the various years that were archived, a user could view or download the PDF. That's one idea.

dantreacy's avatar

@jlrdw Yeah something a little more "static" certainly came to mind, but there's a desire amongst the group to be able to use the larger community to do things like tag photos with current and former members and utilise the archive as something of a historical record.

This is on the "nice to have" list so may need to be sacrificed if I can't come up with a decent solution.

martinbean's avatar
Level 80

@dantreacy I’d maybe have a Photographer model that acts as a profile model. When a user registers, a Photographer model is created for them and associated with them using a user_id column. You can make this column null and use null values to indicate it’s a “legacy” photographer profile. Any photos posted are then linked to a Photographer profile.

dantreacy's avatar

@martinbean That's a good idea, I had thought about some variation of the user_id association/null idea before, but not specifically about having the Photographer model set up as a profile model. I can see that working pretty well.

Thanks. I think that's pretty much what I was after.. Confirmed at least one of the general idea/concepts I'd considered.

You can't see any real hidden gotchas that I might run into with that?

1 like
martinbean's avatar

You can't see any real hidden gotchas that I might run into with that?

@dantreacy Only “gotcha” I can see is where you store the name. The Photographer model is probably going to need a name column for photographers that don‘t belong to a user. If the photographer profile model has its own name, it then means users can sign up but maybe specify the name of their photography business, like “ACME Photography Services” or something.

1 like

Please or to participate in this conversation.