🔖 Version 1.0.0-beta
This commit is contained in:
parent
c93a06972b
commit
460a811554
26 changed files with 2480 additions and 771 deletions
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Civi\Mailinglistsync;
|
||||
|
||||
|
@ -37,7 +38,7 @@ function getLocationTypes(): array {
|
|||
}
|
||||
catch (\Exception $e) {
|
||||
throw new MailinglistException(
|
||||
E::ts('Could not get location types'),
|
||||
"Could not get location types: {$e->getMessage()}",
|
||||
MailinglistException::ERROR_CODE_GET_LOCATION_TYPES_FAILED,
|
||||
);
|
||||
}
|
||||
|
@ -47,3 +48,13 @@ function getLocationTypes(): array {
|
|||
|
||||
return $locationTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a user ID of the current session.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function getSessionUser(): int {
|
||||
$session = \CRM_Core_Session::singleton();
|
||||
return (int) $session->get('userID');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue