Answers.Body: <p>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.</p>
  
  <p>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:</p>
  
  <p>CRM/Utils/System/Drupal.php</p>
  
  <p>Check the functions createUser and checkUserNameEmailExists</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-18T04:43:57.780Z
Answers.Text: 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?
Answers.UserDisplayName: Seamus Lee
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-28T14:42:03.350Z
Answers.LastActivityDate: 2015-04-28T14:42:03.350Z
Answers.UserDisplayName: Donald Lobo
Body: <p>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</p>
  
  <p>Anyone got any thoughts?</p>
  
  <p>Cheers</p>
  
  <p>Also my system is CiviCRM 4.4.13, Drupal 7.35</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-27T05:26:12.237Z
Comments.Text: This isn't a civicrm question as it's drupal handling the password. You should ask that question in their SE
Comments.UserDisplayName: Xavier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-28T00:49:31.930Z
Comments.Text: 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
Comments.UserDisplayName: Donald Lobo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-28T01:20:35.813Z
Comments.Text: IMO this question is relevant to CiviCRM because we are specifically talking about creating a password from within the Civi interface.
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-28T06:03:18.717Z
Comments.Text: 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.
Comments.UserDisplayName: Seamus Lee
Tags: <drupal><user-account>
Title: Strength testing password used to create user account
ThreadText: # Strength testing password used to create user account
  
  (Asked by: username_0 on 2015-04-27)
  
  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
  
  **Tags:** drupal, user-account
  
  > **Comments:**
  > **username_1**: This isn't a civicrm question as it's drupal handling the password. You should ask that question in their SE  
  > **username_2**: 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  
  > **username_3**: IMO this question is relevant to CiviCRM because we are specifically talking about creating a password from within the Civi interface.  
  > **username_0**: 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.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-04-28. Score: 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
  
  > **Comments:**
  > **username_0**: Thanks username_2 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?  
  
  ---
  
  