XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
MiscSslloginAction.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
16/***
17 * @internal
18 * @public
19 * @todo This action should be implemented by base. We must move it to user.
20 */
21class Legacy_MiscSslloginAction extends Legacy_Action
22{
23 public function execute(&$controller, &$xoopsUser)
24 {
25 return LEGACY_FRAME_VIEW_INDEX;
26 }
27
28 public function executeViewIndex(&$controller, &$xoopsUser, &$render)
29 {
30 //
31 // Because this action's template uses USER message catalog, load it.
32 //
33 $root =& $controller->mRoot;
34
35 $config_handler =& xoops_gethandler('config');
36 $moduleConfigUser =& $config_handler->getConfigsByDirname('user');
37
38 if (1 == $moduleConfigUser['use_ssl'] && ! empty($_POST[$moduleConfigUser['sslpost_name']])) {
39 if (!isset($_SESSION)) {
40 session_id($_POST[$moduleConfigUser['sslpost_name']]);
41 }
42 }
43
44 $render->setTemplateName('legacy_misc_ssllogin.html');
45 $render->setAttribute('message', XCube_Utils::formatString(_MD_LEGACY_MESSAGE_LOGIN_SUCCESS, $xoopsUser->get('uname')));
46 }
47}
static formatString()
[Static] Formats string with special care for international.