----------------------------------------
* CRM-12556: Assign api_key for a user via command-line
http://issues.civicrm.org/jira/browse/CRM-12556
var \$password = 'demo';
var \$adminUsername = '${ADMIN_USER}';
var \$adminPassword = '${ADMIN_PASS}';
+ var \$adminApiKey = 'apikey${ADMIN_PASS}';
+ var \$siteKey = '${SITE_KEY}';
var \$UFemail = 'noreply@civicrm.org';
function __construct() {
\$this->fullSandboxPath = \$this->sandboxURL . \$this->sandboxPATH;
drush -l "${SITE_URL}" -y pm-enable civicrm_webtest
drush -l "${SITE_URL}" -y user-create --password=demo --mail='demo@example.com' demo
drush -l "${SITE_URL}" -y user-add-role civicrm_webtest_user demo
+drush -l "${SITE_URL}" -y -u "$ADMIN_USER" civicrm-api contact.create id=user_contact_id api_key="apikey$ADMIN_PASS"
popd