From 9901406634ac8bca0a27dce81d8ee35b26f42779 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Oct 2015 10:15:07 +0200 Subject: [PATCH] A paswword can be set on member card but member can't login. Too much work to fix this into a stable version, so I just introduce a warning to explain why and how to solve this. --- htdocs/adherents/card.php | 9 ++++++++- htdocs/langs/en_US/errors.lang | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 94e31fc24ba..5bf3fef4a3f 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1478,7 +1478,14 @@ else // Password if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''.$langs->trans("Password").''.preg_replace('/./i','*',$object->pass).''; + print ''.$langs->trans("Password").''.preg_replace('/./i','*',$object->pass); + if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id)) + { + $langs->load("errors"); + $htmltext=$langs->trans("WarningPasswordSetWithNoAccount"); + print ' '.$form->textwithpicto('', $htmltext,1,'warning'); + } + print ''; } // Address diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index e3d9fbd72f5..368675a7703 100755 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -174,6 +174,7 @@ ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided ErrorOppStatusRequiredIfAmount=You set an estimated amount for this opportunity/lead. So you must also enter its status # Warnings +WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is just an information and may not be used. If you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but without password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member has a linked user. WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined WarningSafeModeOnCheckExecDir=Warning, PHP option safe_mode is on so command must be stored inside a directory declared by php parameter safe_mode_exec_dir. WarningAllowUrlFopenMustBeOn=Parameter allow_url_fopen must be set to on in filer php.ini for having this module working completely. You must modify this file manually.