From e7763083162eef99801bff940a1025159b534dc2 Mon Sep 17 00:00:00 2001 From: "Paul W. Frields" Date: Fri, 16 Jul 2010 02:11:37 -0400 Subject: Fill in FAS group on form by default --- authfas.module | 2 ++ 1 file changed, 2 insertions(+) (limited to 'authfas.module') diff --git a/authfas.module b/authfas.module index 51b2009..f7f5c99 100644 --- a/authfas.module +++ b/authfas.module @@ -172,12 +172,14 @@ function authfas_form_user_admin_role_alter(&$form, $form_state) { // of the form *before* the submit control. while (list($key, $val) = each($form)) { if ($key == 'submit') { + $fasgroup = db_result(db_query("SELECT fasgroup FROM {authfas_ridmap} WHERE rid = %d;", $form['rid']['#value'])); $newform['fasgroup'] = array( '#type' => 'textfield', '#title' => 'FAS group mapping', '#description' => 'Enter the name for a FAS group that maps to this role.', '#size' => 30, '#maxlength' => 255, + '#default_value' => $fasgroup, ); } $newform[$key] = $val; -- cgit