1: | <?php
|
2: | |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: |
|
18: |
|
19: | use Xmf\Request;
|
20: |
|
21: |
|
22: |
|
23: | |
24: | |
25: | |
26: | |
27: | |
28: | |
29: |
|
30: | class ProfileCorePreload extends XoopsPreloadItem
|
31: | {
|
32: | |
33: | |
34: |
|
35: | public static function eventCoreUserStart($args)
|
36: | {
|
37: | $op = 'main';
|
38: | if (isset($_POST['op'])) {
|
39: | $op = Request::getString('op', '', 'POST');
|
40: | } elseif (isset($_GET['op'])) {
|
41: | $op = Request::getString('op', '', 'GET');
|
42: | }
|
43: | if ($op !== 'login' && (empty($_GET['from']) || 'profile' !== $_GET['from'])) {
|
44: | header('location: ./modules/profile/user.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
|
45: | exit();
|
46: | }
|
47: | }
|
48: |
|
49: | |
50: | |
51: |
|
52: | public static function eventCoreEdituserStart($args)
|
53: | {
|
54: | header('location: ./modules/profile/edituser.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
|
55: | exit();
|
56: | }
|
57: |
|
58: | |
59: | |
60: |
|
61: | public static function eventCoreLostpassStart($args)
|
62: | {
|
63: | $email = Request::getEmail('email', '', 'GET');
|
64: | $email = Request::getEmail('email', $email, 'POST');
|
65: | header("location: ./modules/profile/lostpass.php?email={$email}" . (empty($_GET['code']) ? '' : '&code=' . Request::getString('code', '', 'GET')));
|
66: | exit();
|
67: | }
|
68: |
|
69: | |
70: | |
71: |
|
72: | public static function eventCoreRegisterStart($args)
|
73: | {
|
74: | header('location: ./modules/profile/register.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
|
75: | exit();
|
76: | }
|
77: |
|
78: | |
79: | |
80: |
|
81: | public static function eventCoreUserinfoStart($args)
|
82: | {
|
83: | header('location: ./modules/profile/userinfo.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
|
84: | exit();
|
85: | }
|
86: | }
|
87: | |