From 346cdfa1b7d010c53c80c238c4da3c0042270de6 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Mon, 27 Sep 2010 17:39:47 +0000 Subject: [PATCH] In the UNL Profile, all non-anonymous roles will use the User-1 IMCE profile. git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@188 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- profiles/unl_profile/unl_profile.install | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/profiles/unl_profile/unl_profile.install b/profiles/unl_profile/unl_profile.install index a5d50d58..864e5df5 100644 --- a/profiles/unl_profile/unl_profile.install +++ b/profiles/unl_profile/unl_profile.install @@ -67,7 +67,25 @@ function unl_profile_install() module_disable(array('overlay')); - //TODO: IMCE setup (currently cannot be shared between sites) + // IMCE setup (currently cannot be shared between sites) + // We set every role but the anonymous role to use the "User-1" profile. + $roles = array(); + foreach (user_roles() as $role_id => $role) { + if ($role_id == DRUPAL_ANONYMOUS_RID) { + $roles[$role_id] = array( + 'public_pid' => 0, + 'temporary_pid' => 0 + ); + } else { + $roles[$role_id] = array( + 'public_pid' => 1, + 'temporary_pid' => 1 + ); + } + } + krsort($roles); + variable_set('imce_roles_profiles', $roles); + // End IMCE setup. // Update the settings file to use shared database tables (unless this is the default site) -- GitLab