protected function getUserInfoByAccountId($accountId)
{
if (!isset($this->accountsCache[$accountId])) {
if ($accountId) {
try {
$acc = new \Scalr_Account();
$acc->loadById($accountId);
$this->accountsCache[$accountId] = array('id' => $acc->getOwner()->id, 'email' => $acc->getOwner()->getEmail());
} catch (\Exception $e) {
$this->console->error($e->getMessage());
return array('id' => 0, 'email' => '');
}
} else {
$user = new \Scalr_Account_User();
$user->loadByEmail('admin', 0);
$this->accountsCache[$accountId] = array('id' => $user->id, 'email' => $user->getEmail());
}
}
return $this->accountsCache[$accountId];
}