From 1a4f5715544b655b8c1b813346144c7558721660 Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Sun, 18 Jul 2010 22:08:31 -0400 Subject: Remove debugging cruft --- authfas.module | 7 +------ 1 file changed, 1 insertion(+), 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']); } -- cgit