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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:12:05+00:00 2026-06-09T07:12:05+00:00

Cant get my head around how to do this. I’m wanting to set a

  • 0

Cant get my head around how to do this. I’m wanting to set a “Edit your account” link in the nav of a layout (layout/default.ctp). I want to give the logged in user access to only edit there details (I’ll also handle this in the controller to check its the currently logged in users). But how do I do it in the layout?

I tried this and failed:

<?php echo $this->Html->link('Your Account', array('controller' => 'users', 'action' => 'edit', $this->Auth->users('id')));?>
  • 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-06-09T07:12:07+00:00Added an answer on June 9, 2026 at 7:12 am

    Sorry, I’ve been over complicating things. To solve this I wrote this in the layout:

    <?php echo $this->Html->link('Your Account', array('controller' => 'users', 'action' => 'edit'));?>
    

    and passed the ID in the edit function in the users controller like this

    $id = $this->Auth->user('id');
    $this->User->id = $id;
    

    Hope this helps someone.

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

Sidebar

Related Questions

Hope someone can help i cant seem to get my head around this, i
got a problem, can't get my head around this jquery and would appreciate your
Hay All, I cant seem to get my head around this dispite the number
This is probably a simple one but I cant get my head around it.
I cant seem to get my head around how to create this Each Bold
I just cant seem to get my head around this problem, so thought I
In theory this seems easy but I just can't get my head around this...
Real noob question no doubt, but I can't get my head around this behaviour.
I can't get my head around why this isn't working.. I have a relatively
I can't get my head around how to do this correctly: I'm working 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.