You are here

function load_account_form_submit in Contribute 6

File

./contribute.module, line 49
Lets users contribute to projects

Code

function load_account_form_submit($form, &$form_state) {
  $user_array = array(
    'name' => $form['load_account']['user']['#value'],
  );
  $user = user_load($user_array);
  $amount = $form['load_account']['amount']['#value'];
  contribute_update_user_balance($user->uid, $amount);
  drupal_set_message("User " . $user->name . " loaded with \$" . $amount);
}