$access = '100'; break; case 'user': $access = '25'; break; case 'guest': default: $access = '5'; break; } // auto-user level $new_user = User::create($username, $fullname, $email, $website, $pass1, $access, AmpConfig::get('admin_enable_required')); if (!$new_user) { Error::add('duplicate_user', T_("Error: Insert Failed")); require_once AmpConfig::get('prefix') . '/templates/show_user_registration.inc.php'; break; } if (!AmpConfig::get('admin_enable_required') && !AmpConfig::get('user_no_email_confirm')) { $client = new User($new_user); $validation = md5(uniqid(rand(), true)); $client->update_validation($validation); Registration::send_confirmation($username, $fullname, $email, $website, $pass1, $validation); } require_once AmpConfig::get('prefix') . '/templates/show_registration_confirmation.inc.php'; break; case 'show_add_user': default: require_once AmpConfig::get('prefix') . '/templates/show_user_registration.inc.php'; break; } // end switch on action