所有網頁 圖片 影片 地圖 新聞 網誌搜尋 Gmail 更多 »
最近造訪的群組 | 說明 | 登入
Google 網上論壇首頁
call a controller's action from shell as an authorized user
目前本群組有太多主題設為優先顯示。要優先顯示這個主題,請將其他主題的這個選項取消。
在處理您的要求時發生錯誤。請再試一次。
標幟
  2 個訊息 - 全部摺疊  -  將全文翻譯為 已翻譯 (查看所有原文)
您要留言的群組是 Usenet 群組。在此群組留言,網際網路上的任何使用者將可以看到您的電郵地址。
您的回覆郵件尚未寄出。
您已成功留言
 
寄件人:
收件人:
副本:
後續追蹤對象:
新增副本 | 新增後續追蹤對象 | 編輯主旨
主旨:
驗證:
為了確認,請輸入您在以下圖片中看到的字元,或輸入您按下存取圖示時所聽到的號碼。 注意聽並輸入您聽到的號碼
 
rrd108@gmail.com  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月8日, 上午12時45分
寄件人: "rrd...@gmail.com" <rrd...@gmail.com>
日期: Sat, 7 Nov 2009 08:45:53 -0800 (PST)
當地時間: 2009年11月8日(星期日) 上午12時45分
主旨: call a controller's action from shell as an authorized user
Hari,

My service http://sociall.cc sends and receivesmessages from and to
more social networks like twitter, facebook, etc. I would like to add
a timed messages service where users could set messages to send in a
future time.

For this I need to have my own cake shell and run it by a crontask.

At a certain point I want to call

$this->requestAction('/messages/send');

But messages controller's send action is available if there is an
authenticated user.

So before I call this somehow the shell should authenticated itself as
a user. Than it could send the message, and the shell could
reauthenticate itself as a different user and send messages belongs to
that user.

The question is how could I authenticate the shell as a particular
user?


    回覆    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
rrd108@gmail.com  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月11日, 上午1時05分
寄件人: "rrd...@gmail.com" <rrd...@gmail.com>
日期: Tue, 10 Nov 2009 09:05:47 -0800 (PST)
當地時間: 2009年11月11日(星期三) 上午1時05分
主旨: Re: call a controller's action from shell as an authorized user
Finaly I got the answer on irc.

class TimedShell extends Shell{

function main(){
App::import('Component','Auth');
$this->Auth = new AuthComponent(null);
App::import('Component','Session');
$this->Auth->Session = new SessionComponent(null);
...


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

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