| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id$ 3 4 /** 5 * Settings form. 6 */ 7 function affiliate_admin_settings() { 8 9 $admin = variable_get('affiliate_admin_username', 'admin'); 10 11 $form['affiliate_admin_username'] = array( 12 '#type' => 'textfield', 13 '#title' => 'User name of adminstrator', 14 '#description' => t('The user to whom notifications of affiliate registrations will be sent'), 15 '#size' => 16, 16 '#default_value' => $admin, 17 ); 18 return system_settings_form($form); 19 } 20 21 function affiliate_admin_settings_validate($form, $form_state) { 22 $username = $form_state['values']['affiliate_admin_username']; 23 if ($user = user_load(array('name' => $username))) { 24 variable_set('affiliate_admin_username',$username); 25 } 26 else { 27 form_set_error('affiliate_admin_username', t('Must be the name of a valid user')); 28 } 29 return; 30 } 31
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |