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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:42:46+00:00 2026-05-24T03:42:46+00:00

Simple question for some I am sure. The function itself is doing what is

  • 0

Simple question for some I am sure. The function itself is doing what is asked, but the message is not being flashed when actioned.

Function below:

function edit($id = null) {
            if($this->Auth->user('id')==$id) {
                $this->set('user', $this->User->read(null, $id));
                } else {
                    $this->Session->setFlash(__('You are not authorized to edit other member profiles', true));
                    $this->redirect(array('action' => 'index'));
        }
        if (!empty($this->data)) {
            if ($this->User->save($this->data)) {
                $this->Session->setFlash(__('Member profile saved', true));
                $this->redirect(array('action' => 'index'));
            } else {
                $this->Session->setFlash(__('Member profile could not be saved. Please, try again.', true));
            }
        }
        if (empty($this->data)) {
            $this->data = $this->User->read(null, $id);
        }
        $groups = $this->User->Group->find('list');
        $this->set(compact('groups'));
    }

Still learning the cakephp ropes and kindling some very old PhP skills – so bear with me! Thanks!

  • 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-24T03:42:46+00:00Added an answer on May 24, 2026 at 3:42 am

    Add another line underneath

    echo $this->Session->flash('auth');
    

    Like this:

    echo $this->Session->flash();
    

    This will show regular flash messages

    passing ‘auth’ to the flash method will only show auth flash messages and nothing else. See http://api13.cakephp.org/class/session-helper#method-SessionHelperflash for more information.

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

Sidebar

Related Questions

I'm sure some variation of this question has been asked before but all other,
A simple question I'm sure, but I can't figure it out. I have some
Simple question, but for some reason I couldn't find the exact answer on Google:
Forgive what might seem to some to be a very simple question, but I
This is similar to (but different from) this question . Here is some simple
I asked a question earlier yesterday and got some very good answers for sure.
I know this question has been asked several times for sure, but I have
This should be simple but is boggling me for some reason. I'm sure it's
Pretty simple question. I've got some Polygons and GroundOverlays defined in KML. Is there
Pretty simple question. I have a few ASP RequiredFieldValdators checking some text boxes. Out

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.