0

I have searched google and this site and can't seem to find an answer.

I would like to be able to add multiple logins for an account. Meaning one account could have several emails and passwords associated with it. If a person logs in with a sub account they would see the same thing as the main account.

I will eventually build a way to manage these accounts but first I'm just trying to figure out how to get multiple logins for the same account.

Sorry I don't have code to share, I'm just trying to get a direction to head with this.

  • 1
    This sounds like an XY problem, where you've asked how to implement a solution, not how to solve your problem. Are you trying to allow people to manage profiles on behalf of others? Or have multiple people manage a resource without making them admins? The secure canonical answer to this is don't do it, perhaps if you provided more context as to why you are looking into this, a far better solution can be suggested that is more secure, easier to do, and has fewer pitfalls. Otherwise implementing this as written is a huge task that breaks lots of themes and plugins, a hard fork of WP – Tom J Nowell Jan 13 at 16:55
  • Maybe I can explain it better. When a company registers on my site they sometimes have multiple departments or people who need to access the account. Of course they could just share the login/password across everyone who needs access BUT it would be better if I could just create multiple logins/pws for each person who needs access. Then if someone leaves I can just delete their login. Separate accounts won't work because each person needs to see the meta data associated with the main account. – Jon Jan 13 at 17:31
  • hmmm so you can't store that meta data on a user, you need some other object such as a CPT or a Term to represent the organisation. Think of it how GitHub has organisations, and organisations have users. Otherwise, what you want requires that multiple users be the same user, and booth share and do not share the same user ID, which is a nonstarter – Tom J Nowell Jan 13 at 20:06
  • I feel like this is a pretty common feature for B2B sites, as large businesses often have several departments and people placing orders. I'm not familiar with GitHub organizations, I will have to look into that. – Jon Jan 15 at 14:31
  • Indeed, it's a common feature to have organisations with multiple logins, but the distinction is that those are multiple users that have access to shared resources which is not the same thing. You asked for multiple logins of the same type ( email+password ) for a single user. – Tom J Nowell Jan 15 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.