Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 01:50 am EST
Geeklog Forums
Don't want users to be able to change their passwords
MrG
Anonymous
I'm using the newest version of Geeklog. Just installed a short while ago.
Does anyone know how to remove the "Username & Password" tab when you're logged in and click on the "My Account" link under the User Function block?
New User Registration is not active. We are entering the users and don't want them to be able to change their user name and/or their password that we give them, so we need to remove that from the tab when they click on "My Account".
Thanks.
Does anyone know how to remove the "Username & Password" tab when you're logged in and click on the "My Account" link under the User Function block?
New User Registration is not active. We are entering the users and don't want them to be able to change their user name and/or their password that we give them, so we need to remove that from the tab when they click on "My Account".
Thanks.
9
6
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
You could:
* Comment out the following lines (886 to 916) in "usersettings.php"
$current_password = DB_getItem($_TABLES['users'], 'passwd',
"uid = {$_USER['uid']}");
if (!empty ($A['passwd']) || ($A['email'] != $_USER['email']) ||
($A['cooktime'] != $_USER['cookietimeout'])) {
if (empty($A['old_passwd']) ||
(SEC_encryptPassword($A['old_passwd']) != $current_password)) {
return COM_refresh ($_CONF['site_url']
. '/usersettings.php?msg=83');
} elseif ($_CONF['custom_registration'] &&
function_exists ('CUSTOM_userCheck')) {
$ret = CUSTOM_userCheck ($A['username'], $A['email']);
if (!empty($ret)) {
// Need a numeric return for the default message handler
// - if not numeric use default message
if (!is_numeric($ret['number'])) {
$ret['number'] = 400;
}
return COM_refresh("{$_CONF['site_url']}/usersettings.php?msg={$ret['number']}");
}
}
} elseif ($_CONF['custom_registration'] &&
function_exists ('CUSTOM_userCheck')) {
$ret = CUSTOM_userCheck ($A['username'], $A['email']);
if (!empty($ret)) {
// Need a numeric return for the default message handler
// - if not numeric use default message
if (!is_numeric($ret['number'])) {
$ret['number'] = 400;
}
return COM_refresh("{$_CONF['site_url']}/usersettings.php?msg={$ret['number']}");
}
}
* In the language files change $MESSAGE[68] (on line 1223 in english.php) from
"You have to enter the correct current password."
to
"You are not allowed to perform this action."
Maybe someone else will have a better idea though.
Rouslan
* Comment out the following lines (886 to 916) in "usersettings.php"
Text Formatted Code
$current_password = DB_getItem($_TABLES['users'], 'passwd',
"uid = {$_USER['uid']}");
if (!empty ($A['passwd']) || ($A['email'] != $_USER['email']) ||
($A['cooktime'] != $_USER['cookietimeout'])) {
if (empty($A['old_passwd']) ||
(SEC_encryptPassword($A['old_passwd']) != $current_password)) {
return COM_refresh ($_CONF['site_url']
. '/usersettings.php?msg=83');
} elseif ($_CONF['custom_registration'] &&
function_exists ('CUSTOM_userCheck')) {
$ret = CUSTOM_userCheck ($A['username'], $A['email']);
if (!empty($ret)) {
// Need a numeric return for the default message handler
// - if not numeric use default message
if (!is_numeric($ret['number'])) {
$ret['number'] = 400;
}
return COM_refresh("{$_CONF['site_url']}/usersettings.php?msg={$ret['number']}");
}
}
} elseif ($_CONF['custom_registration'] &&
function_exists ('CUSTOM_userCheck')) {
$ret = CUSTOM_userCheck ($A['username'], $A['email']);
if (!empty($ret)) {
// Need a numeric return for the default message handler
// - if not numeric use default message
if (!is_numeric($ret['number'])) {
$ret['number'] = 400;
}
return COM_refresh("{$_CONF['site_url']}/usersettings.php?msg={$ret['number']}");
}
}
* In the language files change $MESSAGE[68] (on line 1223 in english.php) from
"You have to enter the correct current password."
to
"You are not allowed to perform this action."
Maybe someone else will have a better idea though.
Rouslan
5
7
Quote
MrG
Anonymous
Tried that and it made no difference.
8
14
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
You can also remove lines 34 to 38 and 41 to 47 in {path/to/your/layout/folder/}preferences/profile.thtml
to remove the fields for changing the password in the "username and password" tab.
they look like this:
<dt>{lang_password_help_title}</dt>
<dd>{lang_password_help}</dd>
<dd><strong>{lang_enter_current_password}</strong></dd>
</dl>
and
<dd><input type="password" size="32" maxlength="32" value="{password_value}" name="passwd" id="profile-passwd" class="text"{xhtml}></dd>
<dd class="description">{lang_password_text}</dd>
<dt><label for="profile-passwd_conf">{lang_password_conf}</label></dt>
<dd><input type="password" size="32" maxlength="32" value="{password_value}" name="passwd_conf" id="profile-passwd_conf" class="text"{xhtml}></dd>
<dd class="description">{lang_password_text_conf}</dd>
But this is more of an aesthetic thing and it is more critical that you remove the actual functionality from usersetting.php first.
to remove the fields for changing the password in the "username and password" tab.
they look like this:
Text Formatted Code
<dl class="notes"><dt>{lang_password_help_title}</dt>
<dd>{lang_password_help}</dd>
<dd><strong>{lang_enter_current_password}</strong></dd>
</dl>
and
Text Formatted Code
<dt><label for="profile-passwd">{lang_password}</label></dt><dd><input type="password" size="32" maxlength="32" value="{password_value}" name="passwd" id="profile-passwd" class="text"{xhtml}></dd>
<dd class="description">{lang_password_text}</dd>
<dt><label for="profile-passwd_conf">{lang_password_conf}</label></dt>
<dd><input type="password" size="32" maxlength="32" value="{password_value}" name="passwd_conf" id="profile-passwd_conf" class="text"{xhtml}></dd>
<dd class="description">{lang_password_text_conf}</dd>
But this is more of an aesthetic thing and it is more critical that you remove the actual functionality from usersetting.php first.
7
6
Quote
MrG
Anonymous
So Sorry about that. I simply ASSumed that because the fields were still there that the fix did not work. I hadn't tried it. Just did now, and your fix worked just as you said it would. Thank you.
Didn't realize you put that extra statement in there under your fix for just that purpose.
Again I apologize for not following through.
Rich
Didn't realize you put that extra statement in there under your fix for just that purpose.
Again I apologize for not following through.
Rich
9
7
Quote
All times are EST. The time is now 01:50 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content