所有網頁 圖片 影片 地圖 新聞 網誌搜尋 Gmail 更多 »
最近造訪的群組 | 說明 | 登入
Google 網上論壇首頁
get profile id from session
目前本群組有太多主題設為優先顯示。要優先顯示這個主題,請將其他主題的這個選項取消。
在處理您的要求時發生錯誤。請再試一次。
標幟
  4 個訊息 - 全部摺疊  -  將全文翻譯為 已翻譯 (查看所有原文)
您要留言的群組是 Usenet 群組。在此群組留言,網際網路上的任何使用者將可以看到您的電郵地址。
您的回覆郵件尚未寄出。
您已成功留言
 
寄件人:
收件人:
副本:
後續追蹤對象:
新增副本 | 新增後續追蹤對象 | 編輯主旨
主旨:
驗證:
為了確認,請輸入您在以下圖片中看到的字元,或輸入您按下存取圖示時所聽到的號碼。 注意聽並輸入您聽到的號碼
 
Paulos23  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 7月3日, 上午7時00分
寄件人: Paulos23 <paulitosthe...@gmail.com>
日期: Thu, 2 Jul 2009 16:00:50 -0700 (PDT)
當地時間: 2009年7月3日(星期五) 上午7時00分
主旨: get profile id from session
Hi peeps,
I have a question about user's profile.In particular i have created
some elements the welcome.ctp and the login.ctp.When user isnt logged
in i show the login and if it is i show thw welcome.Until this point
all work perfect.Now in welcome.ctp i have some links about user's
profile (add,edit,view),and the issue i am facing is that i cant
figure out why i cant use $user['Profile']['id'].i know that in views
i have to do  $this->set(compact('user'));  but what about elements?
Apart from that i think it's better to get the user's profile id from
session but i don't know if it is possible....e.g $this->Auth->user
('username')['Profile']['id']     ---->Is right?

any help would be nice!
thx


    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
Paul  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 7月3日, 上午10時39分
寄件人: "Paul" <s...@webprogression.co.nz>
日期: Fri, 3 Jul 2009 14:39:54 +1200
當地時間: 2009年7月3日(星期五) 上午10時39分
主旨: RE: get profile id from session
Pass your user to your elements - $this->element('elemtname', array('somvar'
=> somevalue))

Also SessionHelper is on hand should you need to toy with session values in
the view


    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
paulos nikolo  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 7月3日, 下午5時12分
寄件人: paulos nikolo <paulitosthe...@gmail.com>
日期: Fri, 3 Jul 2009 12:12:18 +0300
當地時間: 2009年7月3日(星期五) 下午5時12分
主旨: Re: get profile id from session

so you mean i should do something like that in
profiles_controller?$this->element('user_menu', array('user'=> $user));???

2009/7/3 Paul <s...@webprogression.co.nz>


    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
Paul  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 7月4日, 下午12時34分
寄件人: "Paul" <s...@webprogression.co.nz>
日期: Sat, 4 Jul 2009 16:34:05 +1200
當地時間: 2009年7月4日(星期六) 下午12時34分
主旨: RE: get profile id from session

No you would be calling that in your view.

Set the user var to the view in your controller

$this->set('user', $user);

Then in your view pass that variable to your element - note though: if you
have set it to the view its generally available in your elements anyway.

  _____  

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of paulos nikolo
Sent: Friday, 3 July 2009 9:12 p.m.
To: cake-php@googlegroups.com
Subject: Re: get profile id from session

so you mean i should do something like that in
profiles_controller?$this->element('user_menu', array('user'=> $user));???

2009/7/3 Paul <s...@webprogression.co.nz>

Pass your user to your elements - $this->element('elemtname', array('somvar'
=> somevalue))

Also SessionHelper is on hand should you need to toy with session values in
the view


    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
無其他留言
« 返回討論主題 « 較新的主題     較舊的主題 »

建立群組 - Google 網上論壇 - Google 首頁 - 服務條款 - 隱私權政策
©2009 Google