Skip to content

Commit

Permalink
9.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Mar 31, 2023
2 parents 5912745 + 182a07d commit e394521
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 19 deletions.
41 changes: 41 additions & 0 deletions blt/src/Blt/Plugin/Commands/HsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,47 @@ class HsCommands extends BltTasks {

use HsCommandTrait;

/**
* Generate a list of emails for the given role on all sites.
*
* @command humsci:role-report
*/
public function roleReport($role) {
$information = [];
foreach ($this->getConfigValue('multisites') as $site) {
$emails = $this->taskDrush()
->alias("$site.prod")
->drush('sqlq')
->arg('SELECT GROUP_CONCAT(d.mail) FROM users_field_data d INNER JOIN user__roles r ON d.uid = r.entity_id WHERE r.roles_target_id = "' . $role . '" and d.mail NOT LIKE "%localhost%"')
->printOutput(FALSE)
->run()
->getMessage();

$site_url = str_replace('_', '-', str_replace('__', '.', $site));


if (str_contains($site_url, '.')) {
[$first, $last] = explode('.', $site_url);
$site_url = "$first-prod.$last";
}
else {
$site_url .= "-prod";
}

$information[] = [
'site' => $site,
'url' => "https://$site_url.stanford.edu",
'users' => $emails == 'NULL' ? '' : $emails,
];
}
$out = fopen('php://output', 'w');
fputcsv($out, ['Site', 'Url', 'Emails']);
foreach ($information as $info) {
fputcsv($out, $info);
}
fclose($out);
}

/**
* Set up local blt settings and necessary files.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'DO NOT INSTALL. This is for profile installation task only.'
core_version_requirement: '^8.8 || ^9'
hidden: true
type: module
version: 9.4.12
version: 9.4.13
default_content:
shortcut:
- 0c69448d-c6fa-4fb8-9b2e-f93f3a955baf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ dependencies:
- 'hook_event_dispatcher:toolbar_event_dispatcher'
- 'hook_event_dispatcher:user_event_dispatcher'
- 'hook_event_dispatcher:views_event_dispatcher'
version: 9.4.12
version: 9.4.13
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Stanford HumSci'
type: profile
description: 'Installation profile for HumSci Drupal'
version: 9.4.12
version: 9.4.13
core_version_requirement: '^8.8 || ^9'
themes:
- material_admin
Expand Down
2 changes: 1 addition & 1 deletion docroot/themes/humsci/humsci_airy/css/humsci_airy.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@
background-color: transparent;
}

.hb-stretch-vertical-linked-cards & {
@include hb-themes(('colorful', 'airy')) {
$hb-bg--fallback: hb-get-pairing-color('primary-dark', $hb-colorful-default, $hc-colorful-pairings);
$hb-bg--pairing: var(--palette--primary-dark);

@include hb-vertical-card-background-block(transparent, $hb-bg--fallback, $hb-bg--pairing);
}

@include hb-traditional {
@include hb-pairing-color('background-color', 'primary');
}
}

&__img {
overflow: hidden;

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit e394521

Please sign in to comment.