3

Is there a way to control the minimum strength of the password required when a user creates a "User record" from the actions menu on a contact record. In Drupal I have been able to do it via using the password_strength module and looking at using the password_policy module

Anyone got any thoughts?

Cheers

Also my system is CiviCRM 4.4.13, Drupal 7.35

  • 1
    This isn't a civicrm question as it's drupal handling the password. You should ask that question in their SE – Xavier Apr 27 '15 at 5:26
  • Have you checked if those modules work with civicrm. Civi calls the Drupal form functions to validate and process the name and password so it might work – Donald Lobo Apr 28 '15 at 0:49
  • IMO this question is relevant to CiviCRM because we are specifically talking about creating a password from within the Civi interface. – Coleman Apr 28 '15 at 1:20
  • I have tried it and was successfully able to create a new user account using the password password, This was through the CiviCRM add user record interface which is why i have put the question here not Drupal's SE. The password strength and password policy modules work fine within Drupal but they don't appear to get hooked in onto CiviCRM's interface. But i guess the question is a bit more wider to just the drupal interaction, is there capability or is this a feature request to add in password strength testing into CiviCRM user record add function as I would have thought this would be good. – Seamus Lee Apr 28 '15 at 6:03
1

Seems like CiviCRM might not be calling the right functions within Drupal (which trigger hook invocation that modules like password_strength or password_policy implement.

Would be good if we can adapt Civi's code to do the right thing. The user/password creation for drupal is isolated to the file:

CRM/Utils/System/Drupal.php

Check the functions createUser and checkUserNameEmailExists

  • Thanks Lobo for that, Sorry haven't responded sooner been busy with other projects. So i had a poke around it and it looks like we use the hook drupal_process_form which is all very nice and gets the job done but I think it the hook_validate_form, doesn't deal with the form_alter which these modules hook into. Also i was thinking that perhaps it might be a better idea instead of thinking of this specifically to do with Drupal / civi interaction but integrating some of the password strength checking into CiviCore in a way that is CMS independent? – Seamus Lee May 18 '15 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.