Support » Plugin: WP SMS Validation » How to add verification button/link in Site Admin (Back end)?

  • Hi,

    I have more than 1000 registered subscribers for my WordPress blog.

    The problem is when a new user sign up for my blog then he/she need to verify by SMS Validation which is ok. But what about users that are already registered before I installed this plugin?

    Is it anyway to ADD a field in Back End where already registered and NOT verified users gets the option to enter there phone number and click Verify to get a SMS with CODE so they can verify after logging in?

    This plugin is little scary cause it LOADS on ALL pages, ALL posts, Front page and Back end. This plugin is NOT good for SEO cause it increases all my internal links by 150KB!!! Which is NOT useful for visitor/guest.

    This Plugin should ONLY load if page is: login.php or in wp-admin area and NOT in front page!!! It will help to load other pages faster and will reduce unesscary scripts to load.

    I saw also a other BUG in this plugin so after a user Verifies there phone number and logs in then they can simply update or delete the VERIFIED phone number.
    To avoid that I have changed sms-validator.php to (READONLY):
    —- `
    <input type=”text” name=”csnetworkssms-mobile” <?php echo current_user_can( ‘edit_users’ ) ? ” : ‘readonly’; ?> id=”csnetworkssms-mobile” maxlength=”20″ size=”20″ value=”<?php echo $csnetworkssms_mobile; ?>” />

    Now I need your help about how to call the Verification / Re-Verify from Back End?
    And whats the name of this function which load this plugin on all pages? So I can unhook/unregister or remove it from single_post, page and frontend.

    Thank you for all your help and good work with this plugin 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • befree22



    Were you able to fix this sms plugin’s load problem so that it only loads on the login page and admin page?


    Yes, but to do that I had to install: Plugin Organizer.
    Then goto Global Plugins and set SMS Validator to OFF

    And then add 2 Plugin Filters:
    1 to set SMS Validator ON for
    2 to set SMS Validator ON for

    In backend (admin page) it’s always ON which is ok.
    I have also modified it to use with gateway.



    I really appreciate your quick response.

    OK, so you fixed the loading bug so that the plugin only load on the login page and admin backend.

    So you switched from to service? Is the latter cheaper? What code changes would I need to make work?

    Yes, I successfully disabled it on front-end and now it only loads on the login/register pager and admin backend. is not cheaper but I like there backend with Logs over sent SMS’s, Deliver Reports, Delivery report on mail and more.

    To get GlobalSMS to work you will need to modify gateways.php

    // auth call
            $baseurl = "";
            $url = sprintf( '%s/http-api.php?action=sendsms&user=%s&password=%s&&from=CYBORG&to=%s&text=%s', $baseurl, $username, $password, $sms_data['to'], $msg );
                // do sendmsg call

    And Replace: CYBORG to the name or number you wish to send SMS from.

    If you use this plugin then you will be interested in this:

    Update this functions in: sms-validator.php

         * Validates phone number
         * @param type $errors
         * @return type
        function registration_errors( $errors ) {
            $enabled = csnetworks_sms_get_option( 'register_form' );
            if ( $enabled == 'on' ) {
                $phone = $_POST['user_phone'];
    if($phone[1] == '0')
    $phone = substr($phone, 2);
    if($phone[0] == '0')
    $errors->add( 'invalid_inter_phone', __( '<strong>ERROR</strong>: Phone Number you entered is NOT a international number.', 'csnetworks' ) );
                if ( $phone == '' ) {
                    $errors->add( 'empty_phone', __( '<strong>ERROR</strong>: Please type your phone number.', 'csnetworks' ) );
                } else if ( phone_exists( $phone ) ) {
                    $errors->add( 'phone_exists', __( '<strong>ERROR</strong>: Phone number is already registered.', 'csnetworks' ) );
                } else {
                    if ( preg_match( '/[^\d]/', $phone ) || (strlen( $phone ) < 10 ) ) {
                        $errors->add( 'invalid_phone', __( '<strong>ERROR</strong>: Please type a valid Phone Number<br />(10 digit minimum and do NOT use "+")', 'csnetworks' ) );
            return $errors;

    Dear Amir (cyborg)

    is the above code complete in all sorts, should i copy paste it as advised above, i need to use bulksms tool.
    i know nothing about php but know HTML well.

    reply soon.


    i may be reached at
    you private reply would also be much appreciated . thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add verification button/link in Site Admin (Back end)?’ is closed to new replies.