protected function verifyAccount($accountId)
    {
        //~ Verify if account is for current user, else throw error 500
        $mapper      = new AccountUserMapper(Database::get('money'));
        $accountUser = $mapper->findByKeys(array('user_id' => Session::getInstance()->get('id'), 'account_id' => $accountId));
        return $accountUser->getAccount();
    }
protected function verifyAccount($accountId)
    {
        //~ Verify if account is for current user, else throw error 500
        $mapper      = new AccountUserMapper(Database::get('money'));
        $accountUser = $mapper->findByKeys(array('user_id' => Session::getInstance()->get('id'), 'account_id' => $accountId));
        return $accountUser->getAccount();
    }
protected function verifyAccount ( $ accountId ) { //~ Verify if account is for current user, else throw error 500 $ mapper = new AccountUserMapper ( Database :: get ( 'money' ) ) ; $ accountUser = $ mapper -> findByKeys ( array ( 'user_id' => Session :: getInstance ( ) -> get ( 'id' ) , 'account_id' => $ accountId ) ) ; return $ accountUser -> getAccount ( ) ; }
Verify if account is really owned by current user and return account object.

@param  integer $accountId
@return Account
Verify if account is really owned by current user and return account object .