AccountPage_Controller::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        if (!Member::currentUserID()) {
            $messages = array('default' => _t('AccountPage.Login', 'You\'ll need to login before you can access the account page.
					If you are not registered, you won\'t be able to access it until
					you make your first order, otherwise please enter your details below.'), 'logInAgain' => _t('AccountPage.LoginAgain', 'You have been logged out. If you would like to log in again,
					please do so below.'));
            Security::permissionFailure($this, $messages);
        } else {
            $this->member = Member::currentUser();
        }
    }

Usage Example

 /**
  * standard controller function
  **/
 function init()
 {
     parent::init();
     Requirements::themedCSS("CorporateAccountPage");
 }
All Usage Examples Of AccountPage_Controller::init