diff options
author | Paul W. Frields <stickster@gmail.com> | 2010-07-18 22:08:31 -0400 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2010-07-18 22:08:31 -0400 |
commit | 1a4f5715544b655b8c1b813346144c7558721660 (patch) | |
tree | 69ca95d2a93183feac3634e72e37be4065682d2c | |
parent | 61cfeade2a3c3ccf87556dd400b66adf565e0e69 (diff) | |
download | drupal-authfas-6x-1a4f5715544b655b8c1b813346144c7558721660.tar.gz drupal-authfas-6x-1a4f5715544b655b8c1b813346144c7558721660.tar.xz drupal-authfas-6x-1a4f5715544b655b8c1b813346144c7558721660.zip |
Remove debugging cruft
-rw-r--r-- | authfas.module | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/authfas.module b/authfas.module index e59698d..89a700b 100644 --- a/authfas.module +++ b/authfas.module @@ -259,7 +259,7 @@ function authfas_remap_roles($username, $fasgroups) { * the final session creation happens. */ global $user; - drupal_set_message('$user->roles: '.serialize($user->roles)); + foreach ($fasgroups as $fasgroup) { $newfasgroups[] = $fasgroup['name']; } @@ -276,21 +276,16 @@ function authfas_remap_roles($username, $fasgroups) { */ foreach ($ridmap as $ridmapentry) { // For all the rid<->fasgroup mappings that Drupal knows about... - drupal_set_message('Processing rid '.$ridmapentry['rid'].', fasgroup '.$ridmapentry['fasgroup']); if (in_array($ridmapentry['fasgroup'], $fasgroups)) { // If the user's in the fasgroup... - drupal_set_message('User '.$username.' is in fasgroup '.$ridmapentry['fasgroup']); if (!in_array($ridmapentry['rid'], array_keys($user->roles))) { // But the rid isn't in the user's Drupal roles... - drupal_set_message('Rid '.$ridmapentry['rid'].' is not in roles for '.$username); // ...make it so! db_query("INSERT INTO {users_roles} (uid, rid) VALUES ('%s', '%s')", $user->uid, $ridmapentry['rid']); } } else { // If the user's *NOT* in the fasgroup... - drupal_set_message('User '.$username.' is not in fasgroup '.$ridmapentry['fasgroup']); if (in_array($ridmapentry['rid'], array_keys($user->roles))) { // But the rid *IS* in the user's Drupal roles... - drupal_set_message('Rid '.$ridmapentry['rid'].' is in roles for '.$username); // ...make it not so! db_query("DELETE FROM {users_roles} WHERE uid=%d AND rid=%d", $user->uid, $ridmapentry['rid']); } |