You are here

function luxe_register_page in Luxe 7

1 string reference to 'luxe_register_page'
luxe_menu_alter in ./luxe.module

File

./luxe.module, line 94

Code

function luxe_register_page($username = null) {
  global $user;
  if ($user->uid) {
    drupal_goto('user/' . $user->uid);
  }
  drupal_set_title(variable_get('luxe_register_title', 'Sign up'));
  $form = drupal_get_form('user_register_form');

  // Pre-fill the username if it's present in the URL
  if (!empty($username) && empty($form['account']['name']['#value'])) {
    $form['account']['name']['#value'] = $username;
  }
  return drupal_render($form);
}