/**
  * Get member setting data
  * 
  * @return array
  */
 public static function _getConfig()
 {
     if (empty(self::$_config)) {
         $configData = Fox::getModel('core/preference')->getPreferenceData('member_configuration');
         if (isset($configData['member_configuration'])) {
             self::$_config = $configData['member_configuration'];
         }
     }
     if (!isset(self::$_config['account'])) {
         throw new Exception('Account settings was not found.');
     }
     return self::$_config;
 }
 /**
  * Determines whether the image file exists
  * 
  * @return boolean
  */
 public function isImageExists()
 {
     $imagePath = Fox_Member_Model_Member::getImageUploadPath();
     return Fox::getLoggedMember()->getMemberImage() && file_exists($imagePath . DIRECTORY_SEPARATOR . Fox::getLoggedMember()->getMemberImage());
 }
 /**
  * Get row url
  * 
  * @param Fox_Member_Model_Member $row
  * @return string
  */
 public function getRowUrl($row = NULL)
 {
     return $this->getUrl('*/*/edit', array('id' => $row->getId()));
 }
 /**
  * Remove image action
  */
 public function removeImageAction()
 {
     $memberModel = Fox::getModel('member/member');
     $memberModel->getAdapter()->beginTransaction();
     try {
         $memberData = Fox::getLoggedMember();
         $memberModel->load($memberData->getId());
         $path = Fox_Member_Model_Member::getImageUploadPath();
         $prevImage = $memberModel->getMemberImage();
         $memberModel->setMemberImage('');
         $memberModel->save();
         $memberModel->getAdapter()->commit();
         if ($prevImage && file_exists($path . DIRECTORY_SEPARATOR . $prevImage)) {
             @unlink($path . DIRECTORY_SEPARATOR . $prevImage);
         }
         Fox::getModel('member/session')->setLoginData($memberModel);
         Fox::getHelper('core/message')->setInfo('Profile image was successfully removed.');
     } catch (Exception $e) {
         $memberModel->getAdapter()->rollback();
         Fox::getHelper('core/message')->setError($e->getMessage());
     }
     $this->sendRedirect('*/*/edit-image');
 }