summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2010-07-16 02:11:37 -0400
committerPaul W. Frields <stickster@gmail.com>2010-07-16 02:11:37 -0400
commite7763083162eef99801bff940a1025159b534dc2 (patch)
tree7e1e127a1f499e4bbb4c145a650483a6b38ae663
parent651f4d891dea11606e7d0d3ee0211c12dd07efa9 (diff)
downloaddrupal-authfas-6x-e7763083162eef99801bff940a1025159b534dc2.tar.gz
drupal-authfas-6x-e7763083162eef99801bff940a1025159b534dc2.tar.xz
drupal-authfas-6x-e7763083162eef99801bff940a1025159b534dc2.zip
Fill in FAS group on form by default
-rw-r--r--authfas.module2
1 files changed, 2 insertions, 0 deletions
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;