@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | define("_PROFILE_AM_PROF_SEARCH", "Searchable by these groups"); |
50 | 50 | define("_PROFILE_AM_PROF_ACCESS", "Profile accessible by these groups"); |
51 | 51 | define("_PROFILE_AM_PROF_ACCESS_DESC", |
52 | - "<ul>" . |
|
53 | - "<li>Admin groups: If a user belongs to admin groups, the current user has access if and only if one of the current user's groups is allowed to access admin group; else</li>" . |
|
54 | - "<li>Non basic groups: If a user belongs to one or more non basic groups (NOT admin, user, anonymous), the current user has access if and only if one of the current user's groups is allowed to allowed to any of the non basic groups; else</li>" . |
|
55 | - "<li>User group: If a user belongs to User group only, the current user has access if and only if one of his groups is allowed to access User group</li>" . |
|
52 | + "<ul>". |
|
53 | + "<li>Admin groups: If a user belongs to admin groups, the current user has access if and only if one of the current user's groups is allowed to access admin group; else</li>". |
|
54 | + "<li>Non basic groups: If a user belongs to one or more non basic groups (NOT admin, user, anonymous), the current user has access if and only if one of the current user's groups is allowed to allowed to any of the non basic groups; else</li>". |
|
55 | + "<li>User group: If a user belongs to User group only, the current user has access if and only if one of his groups is allowed to access User group</li>". |
|
56 | 56 | "</ul>"); |
57 | 57 | |
58 | 58 | define("_PROFILE_AM_FIELDVISIBLE", "The field "); |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | // User management |
87 | 87 | define("_PROFILE_AM_EDITUSER", "Edit User"); |
88 | 88 | define("_PROFILE_AM_SELECTUSER", "Select User"); |
89 | -define("_PROFILE_AM_ADDUSER","Add User"); |
|
90 | -define("_PROFILE_AM_THEME","Theme"); |
|
91 | -define("_PROFILE_AM_RANK","Rank"); |
|
92 | -define("_PROFILE_AM_USERDONEXIT","User doesn't exist!"); |
|
89 | +define("_PROFILE_AM_ADDUSER", "Add User"); |
|
90 | +define("_PROFILE_AM_THEME", "Theme"); |
|
91 | +define("_PROFILE_AM_RANK", "Rank"); |
|
92 | +define("_PROFILE_AM_USERDONEXIT", "User doesn't exist!"); |
|
93 | 93 | define("_PROFILE_MA_USERLEVEL", "User Level"); |
94 | 94 | |
95 | 95 | define("_PROFILE_MA_ACTIVE", "Active"); |
@@ -118,4 +118,4 @@ discard block |
||
118 | 118 | define("_PROFILE_AM_CATEGORY_LIST", "List of categories"); |
119 | 119 | define("_PROFILE_AM_STEP_LIST", "List of registration step"); |
120 | 120 | define("_PROFILE_AM_FIELD_LIST", "List of fields"); |
121 | -define("_PROFILE_AM_ERROR_WEIGHT","You need a positive integer"); |
|
121 | +define("_PROFILE_AM_ERROR_WEIGHT", "You need a positive integer"); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @author Taiwen Jiang <[email protected]> |
21 | 21 | */ |
22 | 22 | |
23 | -include __DIR__ . '/header.php'; |
|
23 | +include __DIR__.'/header.php'; |
|
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $email = isset($_GET['email']) ? trim($_GET['email']) : ''; |
26 | 26 | $email = isset($_POST['email']) ? trim($_POST['email']) : $email; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $xoopsMailer->setTemplate("lostpass2.tpl"); |
48 | 48 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
49 | 49 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
50 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
50 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
51 | 51 | $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); |
52 | 52 | $xoopsMailer->assign("NEWPWD", $newpass); |
53 | 53 | $xoopsMailer->setToUsers($user); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (!$xoopsDB->queryF($sql)) { |
65 | 65 | $xoops->header(); |
66 | 66 | echo XoopsLocale::E_USER_NOT_UPDATED; |
67 | - include __DIR__ . '/footer.php'; |
|
67 | + include __DIR__.'/footer.php'; |
|
68 | 68 | } |
69 | 69 | $xoops->redirect("user.php", 3, sprintf(XoopsLocale::SF_PASSWORD_SENT_TO, $user->getVar("uname")), false); |
70 | 70 | // If no Code, send it |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $xoopsMailer->setTemplate("lostpass1.tpl"); |
75 | 75 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
76 | 76 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
77 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
77 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
78 | 78 | $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); |
79 | - $xoopsMailer->assign("NEWPWD_LINK", \XoopsBaseConfig::get('url') . "/modules/profile/lostpass.php?email={$email}&code=" . $areyou); |
|
79 | + $xoopsMailer->assign("NEWPWD_LINK", \XoopsBaseConfig::get('url')."/modules/profile/lostpass.php?email={$email}&code=".$areyou); |
|
80 | 80 | $xoopsMailer->setToUsers($user); |
81 | 81 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
82 | 82 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | echo "<h4>"; |
89 | 89 | printf(XoopsLocale::F_CONFIRMATION_EMAIL_SENT, $user->getVar('uname')); |
90 | 90 | echo "</h4>"; |
91 | - include __DIR__ . '/footer.php'; |
|
91 | + include __DIR__.'/footer.php'; |
|
92 | 92 | } |
93 | 93 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author Taiwen Jiang <[email protected]> |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | |
27 | 27 | $xoops = Xoops::getInstance(); |
28 | 28 | $op = 'main'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL); |
53 | 53 | $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD); |
54 | 54 | $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken()); |
55 | - include __DIR__ . '/footer.php'; |
|
55 | + include __DIR__.'/footer.php'; |
|
56 | 56 | } |
57 | 57 | if (!empty($_GET['xoops_redirect'])) { |
58 | 58 | $redirect = trim($_GET['xoops_redirect']); |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | } |
65 | 65 | } |
66 | 66 | if (!$isExternal) { |
67 | - header('Location: ' . $redirect); |
|
67 | + header('Location: '.$redirect); |
|
68 | 68 | exit(); |
69 | 69 | } |
70 | 70 | } |
71 | - header('Location: ./userinfo.php?uid=' . $xoops->user->getVar('uid')); |
|
71 | + header('Location: ./userinfo.php?uid='.$xoops->user->getVar('uid')); |
|
72 | 72 | exit(); |
73 | 73 | } |
74 | 74 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | if ($xoops->isUser()) { |
86 | 86 | $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); |
87 | 87 | } |
88 | - $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; |
|
89 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 1, $message); |
|
88 | + $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT.'<br />'.XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE; |
|
89 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 1, $message); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if ($op === 'actv') { |
@@ -98,18 +98,18 @@ discard block |
||
98 | 98 | if ($op === 'delete') { |
99 | 99 | $xoops->getConfigs(); |
100 | 100 | if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) { |
101 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
101 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
102 | 102 | } else { |
103 | 103 | $groups = $xoops->user->getGroups(); |
104 | 104 | if (in_array(FixedGroups::ADMIN, $groups)) { |
105 | 105 | // users in the webmasters group may not be deleted |
106 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED); |
|
106 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED); |
|
107 | 107 | } |
108 | 108 | $ok = !isset($_POST['ok']) ? 0 : (int)($_POST['ok']); |
109 | 109 | if ($ok != 1) { |
110 | - include __DIR__ . '/header.php'; |
|
111 | - echo $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); |
|
112 | - include __DIR__ . '/footer.php'; |
|
110 | + include __DIR__.'/header.php'; |
|
111 | + echo $xoops->confirm(array('op' => 'delete', 'ok' => 1), 'user.php', XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT.'<br/>'.XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO); |
|
112 | + include __DIR__.'/footer.php'; |
|
113 | 113 | } else { |
114 | 114 | $del_uid = $xoops->user->getVar("uid"); |
115 | 115 | if (false != $xoops->getHandlerMember()->deleteUser($xoops->user)) { |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | if ($xoops->isActiveModule('notifications')) { |
119 | 119 | Notifications::getInstance()->getHandlerNotification()->unsubscribeByUser($del_uid); |
120 | 120 | } |
121 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); |
|
121 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED); |
|
122 | 122 | } |
123 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
123 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @author Taiwen Jiang <[email protected]> |
23 | 23 | */ |
24 | 24 | |
25 | -include __DIR__ . '/header.php'; |
|
25 | +include __DIR__.'/header.php'; |
|
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | |
28 | 28 | if (!$xoops->isUser()) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | // see https://github.com/dropbox/zxcvbn |
33 | 33 | $zxcvbn_path = $xoops->url('modules/profile/assets/js/zxcvbn.js'); |
34 | -$zxcvbn =<<<EOT |
|
34 | +$zxcvbn = <<<EOT |
|
35 | 35 | (function(){ |
36 | 36 | var a; |
37 | 37 | a=function(){ |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | } |
129 | 129 | } |
130 | 130 | $xoops->redirect( |
131 | - \XoopsBaseConfig::get('url') . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/userinfo.php?uid=' |
|
131 | + \XoopsBaseConfig::get('url').'/modules/'.$xoops->module->getVar('dirname', 'n').'/userinfo.php?uid=' |
|
132 | 132 | . $xoops->user->getVar('uid'), |
133 | 133 | 2, |
134 | 134 | $msg |
135 | 135 | ); |
136 | 136 | } |
137 | 137 | |
138 | -include __DIR__ . '/footer.php'; |
|
138 | +include __DIR__.'/footer.php'; |
@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | * @author Taiwen Jiang <[email protected]> |
22 | 22 | */ |
23 | 23 | |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $xoops->getConfigs(); |
28 | 28 | |
29 | 29 | if (!$xoops->user || $xoops->getConfig('allow_chgmail') != 1) { |
30 | - $xoops->redirect(\XoopsBaseConfig::get('url') . "/modules/" . $xoops->module->getVar('dirname', 'n') . "/", 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
30 | + $xoops->redirect(\XoopsBaseConfig::get('url')."/modules/".$xoops->module->getVar('dirname', 'n')."/", 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | $xoops->header('module:profile/profile_email.tpl'); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $xoopsMailer->setTemplate('emailchanged.tpl'); |
68 | 68 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
69 | 69 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
70 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
70 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
71 | 71 | $xoopsMailer->assign("NEWEMAIL", $email); |
72 | 72 | $xoopsMailer->setToEmails($email); |
73 | 73 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | $msg = implode('<br />', $xoops->user->getErrors()); |
80 | 80 | } |
81 | 81 | } |
82 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/userinfo.php?uid=' . $xoops->user->getVar('uid'), 2, $msg); |
|
82 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/modules/'.$xoops->module->getVar('dirname', 'n').'/userinfo.php?uid='.$xoops->user->getVar('uid'), 2, $msg); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | $xoops->registry()->get('profile_breadcrumbs')->addItem(new Link(['caption' => _PROFILE_MA_CHANGEMAIL])); |
86 | 86 | |
87 | -include __DIR__ . '/footer.php'; |
|
87 | +include __DIR__.'/footer.php'; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | // View Account |
27 | 27 | $ret[] = [ |
28 | 28 | 'name' => XoopsLocale::VIEW_ACCOUNT, |
29 | - 'link' => $helper->url('userinfo.php?uid=' . $helper->xoops()->user->getVar('uid')), |
|
29 | + 'link' => $helper->url('userinfo.php?uid='.$helper->xoops()->user->getVar('uid')), |
|
30 | 30 | 'icon' => 'glyphicon-user', |
31 | 31 | ]; |
32 | 32 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | if (\Xoops::getInstance()->isUser()) { |
40 | 40 | $ret[] = array('name' => _PROFILE_MI_EDITACCOUNT, 'url' => "edituser.php"); |
41 | 41 | $ret[] = array('name' => _PROFILE_MI_PAGE_SEARCH, 'url' => "search.php"); |
42 | - $ret[] = array('name' => _PROFILE_MI_CHANGEPASS, 'url' => "changepass.php"); |
|
42 | + $ret[] = array('name' => _PROFILE_MI_CHANGEPASS, 'url' => "changepass.php"); |
|
43 | 43 | } |
44 | 44 | return $ret; |
45 | 45 | } |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | $field->setVar('field_options', array()); |
228 | 228 | } |
229 | 229 | if ($this->insertField($field)) { |
230 | - $msg = ' Field <strong>' . $vars['name'] . '</strong> added to the database'; |
|
230 | + $msg = ' Field <strong>'.$vars['name'].'</strong> added to the database'; |
|
231 | 231 | } else { |
232 | - $msg = ' <span class="red">ERROR: Could not insert field <strong>' . $vars['name'] . '</strong> into the database. ' . implode(' ', $field->getErrors()) . $this->db2->errorInfo() . '</span>'; |
|
232 | + $msg = ' <span class="red">ERROR: Could not insert field <strong>'.$vars['name'].'</strong> into the database. '.implode(' ', $field->getErrors()).$this->db2->errorInfo().'</span>'; |
|
233 | 233 | } |
234 | 234 | unset($field); |
235 | 235 | return $msg; |
@@ -283,10 +283,10 @@ discard block |
||
283 | 283 | $searchvars_profile = array_diff($searchvars, $uservars); |
284 | 284 | $sv = array('u.uid, u.uname, u.email, u.user_viewemail'); |
285 | 285 | if (!empty($searchvars_user)) { |
286 | - $sv[0] .= ",u." . implode(", u.", $searchvars_user); |
|
286 | + $sv[0] .= ",u.".implode(", u.", $searchvars_user); |
|
287 | 287 | } |
288 | 288 | if (!empty($searchvars_profile)) { |
289 | - $sv[] = "p." . implode(", p.", $searchvars_profile); |
|
289 | + $sv[] = "p.".implode(", p.", $searchvars_profile); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | $qb = $xoops->db()->createXoopsQueryBuilder(); |
@@ -124,7 +124,7 @@ |
||
124 | 124 | $this->addElement($remove_options); |
125 | 125 | } |
126 | 126 | |
127 | - $option_text = "<table cellspacing='1'><tr><td class='width20'>" . _PROFILE_AM_KEY . "</td><td>" . _PROFILE_AM_VALUE . "</td></tr>"; |
|
127 | + $option_text = "<table cellspacing='1'><tr><td class='width20'>"._PROFILE_AM_KEY."</td><td>"._PROFILE_AM_VALUE."</td></tr>"; |
|
128 | 128 | for ($i = 0; $i < 3; ++$i) { |
129 | 129 | $option_text .= "<tr><td><input type='text' name='addOption[{$i}][key]' id='addOption[{$i}][key]' size='15' /></td><td><input type='text' name='addOption[{$i}][value]' id='addOption[{$i}][value]' size='35' /></td></tr>"; |
130 | 130 | $option_text .= "<tr height='3px'><td colspan='2'> </td></tr>"; |