Show
Ignore:
Timestamp:
07/04/08 01:30:16 (5 months ago)
Author:
kumatch
Message:

Adjusted the change of authenticated user (self) object.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/piece_framework/trunk/web/frontend/webapp/actions/Account/PictureAction.php

    r15019 r15136  
    5252    { 
    5353        if (is_null($this->_self)) { 
    54             $loginUser = $this->_context->getSession()->getAttribute('loginUser'); 
    55             $this->_self = new Phwittr_Self($loginUser->id); 
     54            $this->_self = $this->_context->getAttribute('self'); 
    5655        } 
    5756    } 
     
    6160        $master = new Piece_Unity_Service_Runemaster(); 
    6261        $master->addForm('AccountPicture', '/account/picture', true, true); 
    63  
    64         $viewElement = $this->_context->getViewElement(); 
    65         $viewElement->setElementByRef('self', $this->_self); 
    6662    } 
    6763 
     
    8379 
    8480        Phwittr_Account::updatePicture($this->_self->id, $saveFilePath); 
    85         unset($this->_self); 
    86         $this->_self = null; 
     81 
     82        $selfId = $this->_self->id; 
     83        $this->_self = new Phwittr_Self($selfId); 
     84 
     85        $this->_context->getSession()->setAttributeByRef('self', $this->_self); 
     86        $this->_context->getViewElement()->setElementByRef('self', $this->_self); 
    8787 
    8888        return 'DisplayForm';