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 3874760
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:11:20+00:00 2026-05-19T22:11:20+00:00

How do we build a profile page that outputs the user’s data? and this

  • 0

How do we build a profile page that outputs the user’s data? and this page can only be viewed by the user who logged in. It’s something like when we go to our profile page and view our own username, password, email, address..etc. Then we may edit it by ourselves. It, of course can’t be edited by other users.

I’m confused with the need of a profile table, now I think we would not need it? we can just populate the data using some PHP logic on a page we create as profile.ctp ?

This is confusing, I followed this http://book.cakephp.org/#!/view/1041/hasOne and created a profile table with some fields my users table has, and then with a foreign key called user_id. I checked on User and Profile model both are correctly defined in the relationship. I have this in Profile model:

var $belongsTo = array(
        'User' => array(
            'className' => 'User',
            'foreignKey' => 'user_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )

and this in User model:

var $hasOne = 'Profile'; 

As I browse to my profile/index there are field names without any records. It’s empty set. I thought it was supposed to retrieve data from the users’ table ??

What’s the best way to create a profile page for the existing users.. and the upcoming registrations ?

  • 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-19T22:11:21+00:00Added an answer on May 19, 2026 at 10:11 pm

    You do not need a profile table (if you already have a users table with their info).

    One way of having this done is, after user validation, compare his id with id of the user which profile he wants to visualize. If those match, then it’s a user who is viewing his own profile, and you can let him view his info.

    Ofcourse there’s a great deal of security issues you would have to take into account if you are thinking to make this a public accessible web site.

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

Sidebar

Related Questions

I build and maintain a set of Flash components that is distributed to publishers
I build up an array of strings with string[] parts = string.spilt( ); And
I build websites for a small-ish media company. Unfortunately, around 45-50% of our client
My build process consists of Qt's qmake Makefile generator and the typical make utility
Our build process uses Visual Studios 2003 link.exe for linking. On one machine we're
Our build server is taking too long to build one of our C++ projects.
I build VBA applications for both Word and Excel, is there any way to
Our build is dog slow. It uses nested gnu makefiles on linux. It creates
The build.xml has a test and a build target. The test target obviously depends
Our build is annoyingly slow. It's a Java system built with Ant , and

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.