Make role load conditional upon authenticated role
1 unresolved thread
1 unresolved thread
Closes #3373921
Merge request reports
Activity
Filter activity
13 14 */ 14 15 function google_analytics_install() { 15 16 // Make the default install more user and GDPR friendly. 16 $role = Role::load('authenticated'); 17 $role->grantPermission('opt-in or out of google analytics tracking'); 18 $success = $role->save(); 19 if ($success) { 20 $messenger = \Drupal::messenger(); 21 $messenger->addMessage(t('Module %module granted %permission permission to authenticated users.', ['%module' => 'Google Analytics', '%permission' => t('Opt-in or out of tracking')]), 'status'); 17 if ($role = Role::load(AccountInterface::AUTHENTICATED_ROLE)) { changed this line in version 2 of the diff
added 6 commits
-
6a7840c0...0c0e0691 - 5 commits from branch
project:4.x
- 84c1d635 - Merge branch google_analytics:4.x into 3373921-cannot-install-from
-
6a7840c0...0c0e0691 - 5 commits from branch
Please register or sign in to reply