Skip to content

Instantly share code, notes, and snippets.

View eileenmcnaughton's full-sized avatar

Eileen McNaughton eileenmcnaughton

View GitHub Profile
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "DR_high_level_dedupe_report",
"label": "DR: high level dedupe report",
"api_entity": "Activity",
**** Clone Donut wiki
src/donut exists. Remove and re-clone Donut wiki repo? [yN] y
Are you sure? This will delete src/donut, including local branches. [yN] y
Cloning into 'src/donut'...
remote: Counting objects: 177972, done
remote: Finding sources: 100% (177972/177972)
remote: Getting sizes: 100% (91133/91133)
remote: Compressing objects: 100% (4753839/4753840)
remote: Total 177972 (delta 145491), reused 104765 (delta 82325)
@eileenmcnaughton
eileenmcnaughton / gist:d0fd748092ab7b6492ddc2155c99d654
Created March 26, 2025 02:40
securely check a password is not in the have-i-been-pawned database
<?php
/**
* Basic script to securely check if an entered password is in a known security breach
*
* Allows you to avoid sending your password data out...
* https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2
*
* Sample output
* php pwncheck.php
<?php
namespace Civi;
use Civi\Core\Exception\DBQueryException;
/**
* Queue helper.
*
* This comes from https://gist.github.com/totten/fa830cfced9bb7a92dea485f5422055a
civibuild create wmff
drush @wmff cvapi Contact.create first_name=Bob last_name=Robertson [email protected] contact_type=Individual
drush @wmff cvapi Contact.create first_name=Bob last_name=Robertson [email protected] contact_type=Individual
drush @wmff cvapi Email.create contact_id=207 [email protected] location_type_id=Billing
drush @wmff cvapi Email.create contact_id=207 [email protected] location_type_id=Other
drush @wmff cvapi Email.create contact_id=208 [email protected] location_type_id=Billing
Updgrader function
/**
* Delete now-orphaned records in civicrm_mailing.
*
* @return bool
*/
public function upgrade_4385() : bool {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<div style="padding-top:100px;margin-right:50px;border-style: none;">
<table style="margin-top:5px;padding-bottom:50px;" cellpadding="5" cellspacing="0">
<tr>
https://github.com/civicrm/civicrm-core/pull/12891 relationship types
https://github.com/civicrm/civicrm-core/pull/12824 smart groups of fields
https://github.com/civicrm/civicrm-core/pull/12758 mosaico add test in subject
https://github.com/civicrm/civicrm-core/pull/12764 too many entities deleted when deleting recurring events
https://github.com/civicrm/civicrm-core/pull/12904 current employer on reports
https://github.com/civicrm/civicrm-core/pull/12819 add contact name on membership view
Places where triage help would be great
https://lab.civicrm.org/dev/core/issues/420
1) test up methodology
We are leaning towards starting with one or 2 api & getting them & their tests going & then refining & doing a few more
How do we clean up the test classes? Scenario library? Require php 5.4 & use traits - it could be an option to make v4 require 5.4 even
if core does not initially)
2) use class api rather than procedural array based as a starting point?
$api = new CiviCRM_API4($authParams);
$contact = $api->Contact('create, $params);
$emails = $api->Email('get', $params);