Пример #1
0
 /**
  * Method to get the data that should be injected in the form.
  *
  * @return	array	The default data is an empty array.
  * @since	1.6
  */
 protected function loadFormData()
 {
     // Check the session for previously entered login form data.
     $app = JFactory::getApplication();
     $input = new JInput();
     $data = $app->getUserState('slogin.login.form.data', array());
     // check for return URL from the request first
     if ($return = $input->Get('return', '', 'BASE64')) {
         $data['return'] = base64_decode($return);
         if (!JURI::isInternal($data['return'])) {
             $data['return'] = '';
         }
     }
     // Set the return URL if empty.
     if (!isset($data['return']) || empty($data['return'])) {
         $data['return'] = 'index.php?option=com_users&view=profile';
     }
     $app->setUserState('users.login.form.data', $data);
     return $data;
 }