hi,

it recently came to me that subscribers could be quite easily be replaced by the user entity with some extra fields. there already is a module that could be used for the hash key generator (namly Computed Field). Entity Reference is already on the list of prerequisites and would not change as the main idea is to have a field with entity references to the newsletter lists.

firstname, lastname, gender and alike would simply be added to the user entity on installation of the module and made compulsive so all the data is collected.

i think this could be a real gain when managing subscribers as there are already many modules adding to the user entity and thus would save an entity.

what are your thoughts about this?

greets

Comments

ParisLiakos’s picture

Hello Attilla.

I see 2 major problems here:
the password (which of course we could just provide a random string on signup)
and the fact that d7 user entity does not provide support for bundles (subscribers in 2.x have types, providing the ability to have lets say premium or non-premium subscribers)

i think it would require a lot of hacks to make this work, at least in d7 and maybe have a lot of side-effects..
Dunno i am not sure

attisan’s picture

hi rootatwc,

thx for your reply!

actually i would love to think about what could be done by other modules making it work without hacking ;-) so if you post a list of what the 2.0 subscriber should be able do accomplish i will try to bend my mind around.

as an example you could well do this premium / non-premium stuff by assigning roles to users (would make this module even more compatible with modules like commerce and ubercart as there already are "buy subscription" implementations available!) and implementing rules as needed.

greets

ParisLiakos’s picture

Title: idea about subscribers / users » Subscribers as User entities / bundles
Status: Active » Postponed

thanks
Even by using roles as a substitute of types

There is still no way i can have another class as an Entity class of user. it is hardcoded as stdClass, so that would be limiting in the future.

I have thought about this before and did some research..here is the issue: #1399798: Anonymous user properties are hardcoded

In d8 though it is fixed #1361228: Make the user entity a classed object . see also #1288658: Add bundle support to user entities

So till this issue is resolved i do not consider wasting some development hours just to get in front of wall in the end (in the same time that bundleable subscriber entities are ready in 2.x).

We can revisit this in d8, where things will be a lot easier!