Please help customise a plugin's registration page

Hi, i read that you are on hand to help me with anything wordpress not just WPMU DEV plugins.

The issue i have is that i have a plugin that has created its own register page

instead of wordpress generating the password i want Users to Set the password. but i am not sure how to change this file to allow it. I considered using a plugin and bypassing the plugin register form, but it has two additional fields, Date of birth and Gender in there which stops me doing that.

Any help would be much appreciated

  • Tyler Postle
    • CGO

    Hey Adam,

    Welcome to the WPMU DEV Community!

    We’re happy to help with general WordPress questions yes. However, when it comes to customizing other plugins, that isn’t really something we can offer as first we would need to learn the plugins code and then customize it – which as you could imagine would be quite time consuming. Is it a premium plugin? If so, then I would suggest going to their support area. They will already be familiar with its development.

    We of course will help wherever we can within reason. Which plugin is it by the way? Perhaps we can suggest a workaround that might do the trick for ya :slight_smile:

    Look forward to hearing back!



  • Adam O'Connor
    • WPMU DEV Initiate

    Its the word press dating plugin. from

    I just want to be able to get users to set their own password rather than receiving a wordpress generated one. i have attached the registration code for you to look at if it helps

    thank you

  • Adam O'Connor
    • WPMU DEV Initiate
    $path = $pluginpath . 'image.php';
    //require_once(ABSPATH . WPINC . '/registration.php');
    global $wpdb;
    global $current_user;

    $user_ID = $current_user->ID;

    echo 'sess==' . $_SESSION['security_number'];

    //Check whether the user is already logged in
    if (!$user_ID) {
    global $msg;
    $msg = '';

    $fail_challenge = false;
    $sent = false;
    if ($_POST) {
    //We shall SQL escape all inputs
    $username = esc_sql(sanitizeData(trim($_REQUEST['username']), 'xss_clean'));
    if (empty($username)) {
    $msg = language_code('DSP_USER_NAME_SHOULD_NO_BE_EMPTY');
    } else {
    $email = esc_sql(sanitizeData(trim($_REQUEST['email']), 'xss_clean'));
    $confirm_email = esc_sql(sanitizeData(trim($_REQUEST['confirm_email']), 'xss_clean'));
    if (!preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$/", $email)) {
    $msg = language_code('DSP_PLEASE_ENTER_A_VALID_EMAIL');
    } else if (!preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$/", $confirm_email)) {
    $msg = language_code('DSP_PLEASE_ENTER_A_VALID_EMAIL');
    } else if ($email != $confirm_email) {
    $msg = language_code('DSP_EMAIL_FIELDS_ARE_NOT_SAME');
    } else if ($_REQUEST['terms'] == '') {
    $msg = language_code('DSP_AGREE_TERMS_AND_CONDITIONDS');
    } else if ($_POST['secure'] != $_SESSION['security_number']) {
    $fail_challenge = true;
    } else {

    $sent = true;

    $random_password = wp_generate_password(12, false);

    $dsp_users_table = $wpdb->prefix . DSP_USERS_TABLE;

    $dsp_blacklist_members = $wpdb->prefix . DSP_BLACKLIST_MEMBER_TABLE;

    //Get the IP of the person registering

    $ip = $_SERVER['REMOTE_ADDR'];

    $check_blacklist_ipaddress_table = $wpdb->get_var("SELECT COUNT(*) FROM $dsp_blacklist_members where ip_address = '$ip' AND ip_status=1 ");

    if ($check_blacklist_ipaddress_table <= 0) {

    $status = wp_create_user($username, $random_password, $email);

    $users_table = $wpdb->get_row("SELECT * FROM $dsp_users_table where user_login='$username' ");
    $user_id = $users_table->ID;

    $ip_address_status = 0;

    //Add user metadata to the usermeta table

    update_user_meta($user_id, 'signup_ip', $ip);
    update_user_meta($user_id, 'ip_address_status', $ip_address_status);

    $wpdb->query("INSERT INTO $dsp_blacklist_members SET user_name = '$username', ip_address ='$ip' ,ip_status=0 ");

    $dsp_user_profiles = $wpdb->prefix . DSP_USER_PROFILES_TABLE;
    $gender = $_POST['gender'];
    $month = $_POST['dsp_mon'];
    $day = $_POST['dsp_day'];
    $year = $_POST['dsp_year'];
    $age = $year . "-" . $month . "-" . $day;
    $dateTimeFormat = dsp_get_date_timezone();
    $last_update_date = date('Y-m-d H:i:s');

    $wpdb->query("INSERT INTO $dsp_user_profiles SET user_id = '$user_id', gender ='$gender' ,age='$age',status_id=1, edited='Y', last_update_date='$last_update_date' ");

    if (( is_wp_error($status))) {

    } else {

    $from = get_option('admin_email');

    $headers = language_code('DSP_FROM') . $from . "rn";

    $subject = language_code('DSP_REGISTERATION_SUCCESSFULL');

    $message = language_code('DSP_YOUR_LOGIN_DETAIL') . "n" . language_code('DSP_USER_NAME') . $username . "n" . language_code('DSP_PASSWORD') . $random_password;

    wp_mail($email, $subject, $message, $headers);

    } else {

    $msg = language_code('DSP_IP_BLACKLIST_TEXT');
    <!-- <script src=""></script> -->
    <!-- Remove the comments if you are not using jQuery already in your theme -->
    <div class="dsp_box-out">
    <div class="dsp_box-in">
    <div class="box-page">
    <div style="font-weight:bold;color:<?php echo $temp_color; ?>"><?php //Check whether user registration is enabled by the administrator ?>
    if ($msg != '') {
    echo $msg;
    } else if ($fail_challenge) {
    echo "Incorrect answer!";
    <div id="result"></div> <!-- To hold validation results -->

    <?php } else { ?>
    <div class="dsp_box-out">
    <div class="dsp_box-in">
    <div class="box-page">
    <?php if (get_option('users_can_register')) { ?>
    <div id="result"></div>
    <form action="" method="post" >
    <div class="dsp_reg_main">
    <li><span><?php echo language_code('DSP_USER_NAME'); ?></span> <input type="text" name="username" class="text" value="" /></li>
    <li><span><?php echo language_code('DSP_EMAIL_ADDRESS'); ?></span> <input type="text" name="email" class="text" value="" /></li>
    <li><span><?php echo language_code('DSP_CONFIRM_EMAIL_ADDRESS'); ?></span> <input type="text" name="confirm_email" class="text" value="" /></li>
    <li><span><?php echo language_code('DSP_REGISTER_GENDER'); ?></span> <select name="gender" style="width:70px;">
    <?php echo get_gender_list(); ?>
    <li><span><?php echo language_code('DSP_BIRTH_DATE'); ?></span>
    //array to store the months
    $mon = array(1 => language_code('DSP_JANUARY'),
    <select name="dsp_mon" style="width:100px;">
    foreach ($mon as $key => $value) {
    if ($split_age[1] == $key) {
    <option value="<?php echo $key ?>" selected><?php echo $value ?></option>
    <?php } else { ?>
    <option value="<?php echo $key ?>"><?php echo $value ?></option>
    <?php //make the day pull-down menu ?>
    <select name="dsp_day" style="width:50px;">
    for ($dsp_day = 1; $dsp_day <= 31; $dsp_day++) {
    if ($split_age[2] == $dsp_day) {
    <option value="<?php echo $dsp_day ?>" selected><?php echo $dsp_day ?></option>
    <?php } else { ?>
    <option value="<?php echo $dsp_day ?>"><?php echo $dsp_day ?></option>
    <?php //make the year pull-down menu ?>
    <select name="dsp_year" style="width:60px;">
    $start_dsp_year = $check_start_year->setting_value;
    for ($dsp_year = $start_dsp_year; $dsp_year >= ($start_dsp_year - 72); $dsp_year--) {
    if ($split_age[0] == $dsp_year) {
    <option value="<?php echo $dsp_year ?>" selected><?php echo $dsp_year ?></option>
    <?php } else { ?>
    <option value="<?php echo $dsp_year ?>"><?php echo $dsp_year ?></option>
    <li><span>&nbsp;</span> <?php
    //if($check_terms_page_mode->setting_status== 'Y')

    <?php echo str_replace('[L]', $check_terms_page_mode->setting_value, language_code('DSP_TERMS_TEXT')); ?> <input name="terms" type="checkbox" value="1" />
    <li><span><?php echo language_code('DSP_CAPTCHA'); ?></span>
    <img src="<?php echo $path ?>" alt="Click to reload image" name="captcha" id="captcha" title="Click to reload image" onclick="javascript:reloadCaptcha()" />
    <input type="text" name="secure" value="" onclick="this.value = ''" style="vertical-align:top; width:20px;" />
    <li><span>&nbsp;</span><input type="submit" id="submitbtn" name="submit" value="<?php echo language_code('DSP_REGISTER'); ?>" /> <span class="note-res" style=" float:none; margin-left:10px;"><?php echo language_code('DSP_NOTE_A_PASSWORD_WILL_BE_EMAIL_TO_YOU'); ?></span></li>
    <script type="text/javascript">

    $j = jQuery.noConflict();
    $j("#submitbtn").click(function() {
    $j('#result').html('<img src="<?php echo plugins_url('dsp_dating/images/loading.gif'); ?>" class="loader" />').fadeIn();
    var input_data = $j('#wp_signup_form').serialize();
    type: "POST",
    url: "",
    data: input_data,
    success: function(msg){
    return false;
    <script language="javascript" type="text/javascript">
    /* this is just a simple reload; you can safely remove it; remember to remove it from the image too */
    function reloadCaptcha()
    document.getElementById('captcha').src = document.getElementById('captcha').src + '?' + new Date();
    <?php } else {
    <span style="float:left; width:100%; text-align:center; color:#ff0000;">
    } else {

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.