summaryrefslogtreecommitdiffstats
path: root/authfas.module
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2010-07-10 16:22:43 -0400
committerPaul W. Frields <stickster@gmail.com>2010-07-10 16:22:43 -0400
commit18b8361a7e323b5e28fbd9bb21d31ea6a5a83fea (patch)
treee83a08c8c7e7b9db9f8658207194f7c462de822e /authfas.module
parent00292fc29bb8ba84c43c12ebb4de02f01e565910 (diff)
downloaddrupal-authfas-6x-18b8361a7e323b5e28fbd9bb21d31ea6a5a83fea.tar.gz
drupal-authfas-6x-18b8361a7e323b5e28fbd9bb21d31ea6a5a83fea.tar.xz
drupal-authfas-6x-18b8361a7e323b5e28fbd9bb21d31ea6a5a83fea.zip
User hook_form_FORM_ID_alter() and different commenting
Diffstat (limited to 'authfas.module')
-rw-r--r--authfas.module34
1 files changed, 15 insertions, 19 deletions
diff --git a/authfas.module b/authfas.module
index f11e8da..82e5f9f 100644
--- a/authfas.module
+++ b/authfas.module
@@ -49,7 +49,7 @@ function authfas_block($op = 'list', $delta = 0, $edit = array()) {
*/
function authfas_admin() {
$form = array();
-
+
$form['authfas_fasurl'] = array(
'#type' => 'textfield',
'#title' => t('Location of FAS instance'),
@@ -107,26 +107,22 @@ function authfas_menu() {
return TRUE;
}
-function authfas_form_alter(&$form, $form_state, $form_id) {
+function authfas_form_user_admin_role_alter(&$form, $form_state) {
$newform = array();
- if ($form_id == "user_admin_role") {
- /**
- * I'm obviously not very good at PHP because I couldn't figure
- * out a more clever way to insert this field into an existing
- * $form array.
- */
- while (list($key, $val) = each($form)) {
- if ($key == 'submit') {
- $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,
- );
- }
- $newform[$key] = $val;
+ // I'm obviously not very good at PHP because I couldn't figure
+ // out a more clever way to insert this field into an existing
+ // $form array.
+ while (list($key, $val) = each($form)) {
+ if ($key == 'submit') {
+ $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,
+ );
}
+ $newform[$key] = $val;
}
$form = $newform;
}