/** * Retrieve information about customer * Add last logged in datetime * * @throws Mage_Api2_Exception * @return array */ protected function _retrieve() { /** @var $log Mage_Log_Model_Customer */ $log = Mage::getModel('log/customer'); $log->loadByCustomer($this->getRequest()->getParam('id')); $data = parent::_retrieve(); $data['is_confirmed'] = (int) (!(isset($data['confirmation']) && $data['confirmation'])); $lastLoginAt = $log->getLoginAt(); if (null !== $lastLoginAt) { $data['last_logged_in'] = $lastLoginAt; } return $data; }
/** * Retrieve information about customer * * @throws Mage_Api2_Exception * @return array */ protected function _retrieve() { if ($this->_isOwner($this->getRequest()->getParam('id'))) { return parent::_retrieve(); } }