Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:23:58+00:00 2026-05-28T02:23:58+00:00

I have a table email_addresses and a table users. I am using the users

  • 0

I have a table email_addresses and a table users. I am using the users email address as their username. So the users table would be something like:

email_address_id
password

The email_address_id field would just find the email in the email_addresses table for the username as login information.

I understand I can change the username field to another name like email_address with the auth component, but how would I use a field from a different table as a username?

Right now I have to insert the email in the email table AND the user table which seems like really bad database design.

Any help would be appreciated!

I’m using CakePHP 2.0.5

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:23:59+00:00Added an answer on May 28, 2026 at 2:23 am

    Do you really need to do this? It’s good to keep things that belongs together, together.

    I would keep the email in the User model for authentication.

    Use email_addresses for subsequent emails if that’s what you want.

    Edit:

    Now if some people are granted access and other not, I would add a field in the User model, something like has_access int(1) or whatever speaks to you and check it’s value at login.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a users table and want to use username (which is an email address)
We have a user table, every user has an unique email and username. We
I have table with 50 entries (users with such details like Name Surname Location
I have a 'users' table with two columns, 'email' and 'new_email'. I need: A
I have an HTML table with one column being email addresses; spambot issues aside,
I have a name table with (id,first_name,middle_name,last_name,sex) and an email table with (id_fk,email_add) Infact
I have a table with three fields, FirstName, LastName and Email. Here's some dummy
I have three records in a table example: *Usernames* *email* *city* Nick nick@example.com London
I using devise gem for registration but i have problem. my table include: first_name,
Is there any built in way to get a users email address based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.