diff --git a/easyblog/easyblog.php b/easyblog/easyblog.php index b4da237..21d1c63 100644 --- a/easyblog/easyblog.php +++ b/easyblog/easyblog.php @@ -16,8 +16,8 @@ public function __construct(&$subject, $config = array()) { parent::__construct($subject, $config = array()); - $easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php'; - if (!JFile::exists($easyblog)) { + $easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php'; + if (!JFile::exists($easyblog) || JComponentHelper::isEnabled('com_easysocial', true)) { ApiError::raiseError(404, 'Easyblog not installed'); return; } diff --git a/users/users/login.php b/users/users/login.php index 7c4eaa8..2153406 100644 --- a/users/users/login.php +++ b/users/users/login.php @@ -76,7 +76,8 @@ function keygen() $result = $kmodel->save($data); $key = $result->hash; //add new key in easysocial table - if(JComponentHelper::isEnabled('com_easysocial', true)) + $easyblog = JPATH_ROOT . '/administrator/components/com_easyblog/easyblog.php'; + if (JFile::exists($easyblog) && JComponentHelper::isEnabled('com_easysocial', true)) { { $this->updateEauth( $user , $key ); } @@ -95,9 +96,10 @@ function keygen() } return( $obj ); } + /* - * function for update easyblog keys - * / + * function to update Easyblog auth keys + */ public function updateEauth($user=null,$key=null) { require_once JPATH_ADMINISTRATOR.'/components/com_easysocial/includes/foundry.php';