Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-12010 - Drupal 7 create user class doesn't support multiple creates #20

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,7 @@ tests/phpunit/CiviTest/civicrm.settings.local.php
l10n
vendor
civicrm.settings.php
sql/dummy_processor.mysql
sql/dummy_processor.mysql
.buildpath
.project
.settings
7 changes: 6 additions & 1 deletion CRM/Utils/System/Drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ function createUser(&$params, $mail) {
$form_state['programmed'] = TRUE;
$form_state['method'] = 'post';
$form_state['build_info']['args'] = array();

/*
* if we want to submit this form more than once in a process (e.g. create more than one user)
* we must force it to validate each time for this form. Otherwise it will not validate
* subsequent submissions and the manner in which the password is passed in will be invalid
* */
$form_state['must_validate'] = TRUE;
$config = CRM_Core_Config::singleton();

// we also need to redirect b
Expand Down