is there a way to prevent some users to change they passwords???![]()
is there a way to prevent some users to change they passwords???![]()
Hello lobomaujp,
The only way I see, is to hide the "change password" button with the code but even the administrator couldn't change it. I don't know if this solution is good for you.
Mathieu Rodrigues
Consultant CRM
CARRENET - SugarCRM Gold Partner
>>> Suivez notre actualité sur Twitter ! http://twitter.com/carrenet
Hi
If you want that only Admin can change the password other user can not change.
you can hide the Button with the condition that
if (is_admin($current_user))
{
show button
}
The file you can change is Modules/Users/Detailview.php
It will help you....
Thanks & Regards.
Best Regards
---------------------------------------
Jaydeepsinh Sagar
Sorry can you be more especific im a new user and im a little lost hereOriginally Posted by jsagar
Thanks
In Modules/Users/Detailview.php line 140 :
PHP Code:if (is_admin($current_user)) // add this condition
{
if (!$focus->is_group && (empty($GLOBALS['sugar_config']['disc_client']) || !$GLOBALS['sugar_config']['disc_client'])) {
$buttons .= "<input title='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_TITLE']."' accessKey='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick='return window.open(\"index.php?sugar_body_only=true&module=Users&action=ChangePassword&form=DetailView\",\"test\",\"width=320,height=230,resizable=1,scrollbars=1\");' type='button' name='password' value='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_LABEL']."'> ";
}
}
Mathieu Rodrigues
Consultant CRM
CARRENET - SugarCRM Gold Partner
>>> Suivez notre actualité sur Twitter ! http://twitter.com/carrenet
Sorry for being so annoying but still not working... i found the code replace with yours, and didnt work and imput just the fisrt 2 lines and didt work too...Originally Posted by MatR
php code:
the normal users still able to see the button... the duplicate button works fine.. when normal user access they dont see this button... the code is too make the change password button to behave like the duplicate button right?PHP Code:if (is_admin($current_user)) // add this condition
{
if (!$focus->is_group && (empty($GLOBALS['sugar_config']['disc_client']) || !$GLOBALS['sugar_config']['disc_client'])) {
$buttons .= "<input title='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_TITLE']."' accessKey='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_KEY']."' class='button' LANGUAGE=javascript onclick='return window.open(\"index.php?sugar_body_only=true&module=Users&action=ChangePassword&form=DetailView\",\"test\",\"width=320,height=230,resizable=1,scrollbars=1\");' type='button' name='password' value='".$mod_strings['LBL_CHANGE_PASSWORD_BUTTON_LABEL']."'> ";
}
}
Last edited by lobomaujp; 2008-06-25 at 06:22 PM.
Please... its really important....![]()
Change the lineOriginally Posted by lobomaujp
Hope it helps.Code:if (!$focus->is_group && (empty($GLOBALS['sugar_config']['disc_client']) || !$GLOBALS['sugar_config']['disc_client']))
Nirmit
SourceFuse Technologies
to
Code:if (!$focus->is_group && (empty($GLOBALS['sugar_config']['disc_client']) || !$GLOBALS['sugar_config']['disc_client']) && is_admin($current_user))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks