protected function getParameters() { // If we are not in embedded mode, get variable from application if (!$this->embedded) { return $this->app->getParams('com_kunena'); } return $this->params; }
/** * @param $key * @param $request * @param null $default * @param string $type * * @return mixed|object */ protected function getUserStateFromRequest($key, $request, $default = null, $type = 'none') { // If we are not in embedded mode, get variable from application if (!$this->embedded) { return $this->app->getUserStateFromRequest($key, $request, $default, $type); } // Embedded models/views do not have user state -- all variables come from parameters return $this->getVar($request, $default, 'request', $type); }
/** * Login authentication function * * @param array Array( 'username' => string, 'password' => string ) * @param array Array( 'remember' => boolean ) * @access public * @see JApplication::login */ function login($credentials, $options = array()) { //The minimum group $options['group'] = 'Public Backend'; //Make sure users are not autoregistered $options['autoregister'] = false; //Set the application login entry point if (!array_key_exists('entry_url', $options)) { $options['entry_url'] = JURI::base() . 'index.php?option=com_user&task=login'; } $result = parent::login($credentials, $options); if (!JError::isError($result)) { $lang = JRequest::getCmd('lang'); $lang = preg_replace('/[^A-Z-]/i', '', $lang); $this->setUserState('application.lang', $lang); JAdministrator::purgeMessages(); } return $result; }