Plugin Directory

Changeset 1788073


Ignore:
Timestamp:
12/16/2017 05:44:42 PM (8 years ago)
Author:
yoprogramo
Message:

Version 1.7.0 includes new features for safe auto-registration

Location:
nomorepass-forget-your-passwords/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • nomorepass-forget-your-passwords/trunk/languages/nomorepass-de_DE.po

    r1614511 r1788073  
    22msgstr ""
    33"Project-Id-Version: nomorepass v1.0\n"
    4 "POT-Creation-Date: 2017-02-26 10:06+0100\n"
    5 "PO-Revision-Date: 2017-02-26 10:11+0100\n"
     4"POT-Creation-Date: 2017-11-25 00:26+0100\n"
     5"PO-Revision-Date: 2017-11-25 00:27+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: BiblioEteca Technologies SL <[email protected]>\n"
     
    1919"X-Poedit-SearchPath-0: .\n"
    2020
    21 #: nomorepass.php:28
     21#: nomorepass.php:36
     22msgid "Configuration"
     23msgstr "Konfiguration"
     24
     25#: nomorepass.php:37
     26msgid "Options to configure"
     27msgstr "Konfigurationsoptionen"
     28
     29#: nomorepass.php:44
     30msgid "Show login form"
     31msgstr "Login-Formular anzeigen"
     32
     33#: nomorepass.php:53 nomorepass.php:67 nomorepass.php:81 nomorepass.php:95
     34msgid "NO"
     35msgstr "nein"
     36
     37#: nomorepass.php:54 nomorepass.php:68 nomorepass.php:82 nomorepass.php:96
     38msgid "YES"
     39msgstr "ja"
     40
     41#: nomorepass.php:56
     42msgid "Show the user / password fields?"
     43msgstr "Benutzer-/Passwortfelder anzeigen?"
     44
     45#: nomorepass.php:58
     46msgid "Show password reset"
     47msgstr "Kennwort in Reset-Form anzeigen"
     48
     49#: nomorepass.php:70
     50msgid "Show the password field when resetting password?"
     51msgstr "Zeigt das Passwortfeld beim Zurücksetzen des Passworts an?"
     52
     53#: nomorepass.php:72
     54msgid "Auto-launch QR"
     55msgstr "Autostart QR"
     56
     57#: nomorepass.php:84
     58msgid "Launch the QR on loading login page?"
     59msgstr "Starten Sie den QR beim Laden der Login-Seite?"
     60
     61#: nomorepass.php:86
     62msgid "Auto-login after registration"
     63msgstr "Auto-Login nach der Registrierung"
     64
     65#: nomorepass.php:98
     66msgid "Auto-login after registration?"
     67msgstr "Auto-Login nach der Registrierung?"
     68
     69#: nomorepass.php:103
     70msgid "More info"
     71msgstr "Mehr Infos"
     72
     73#: nomorepass.php:136 nomorepass.php:298
     74msgid "Send to NoMorePass"
     75msgstr "An Mobiltelefon senden"
     76
     77#: nomorepass.php:174 nomorepass.php:348
     78msgid ""
     79"Click to scan with <a href=\"https://nomorepass.com\">NoMorePass</a> app and "
     80"receive the password directly on your mobile phone"
     81msgstr ""
     82"Klicken Sie hier, um mit <a href=\"https://nomorepass.com\">NoMorePass</a> "
     83"app zu scannen und erhalten Sie das Passwort direkt auf Ihr Mobiltelefon."
     84
     85#: nomorepass.php:175
     86msgid "New pass for account"
     87msgstr "Neuer Pass für Konto"
     88
     89#: nomorepass.php:193
    2290msgid "Enter using NoMorePass"
    2391msgstr "Mit NoMorePass eingeben"
     92
     93#: nomorepass.php:194
     94msgid ""
     95"Click on <a href=\"https://nomorepass.com\">NoMorePass</a> icon and use the "
     96"qrcode to login"
     97msgstr ""
     98"Klicken Sie auf das Symbol <a href=\"https://nomorepass.com\">NoMorePass</a> "
     99"und melden Sie sich mit dem qrcode an."
     100
     101#: nomorepass.php:368
     102msgid "<strong>ERROR</strong>: Please, click the NoMorePass icon."
     103msgstr "<strong>ERROR</strong>: Bitte klicken Sie auf das NoMorePass-Symbol."
     104
     105#~ msgid ""
     106#~ "Click to scan with NoMorePass app and receive the password directly on "
     107#~ "your mobile phone"
     108#~ msgstr ""
     109#~ "Klicken Sie hier, um mit der NoMorePass-App zu scannen und das Passwort "
     110#~ "direkt auf Ihrem Mobiltelefon zu erhalten."
  • nomorepass-forget-your-passwords/trunk/languages/nomorepass-es_ES.po

    r1614511 r1788073  
    22msgstr ""
    33"Project-Id-Version: nomorepass v1.0\n"
    4 "POT-Creation-Date: 2017-02-26 10:06+0100\n"
    5 "PO-Revision-Date: 2017-02-26 10:06+0100\n"
     4"POT-Creation-Date: 2017-11-25 00:25+0100\n"
     5"PO-Revision-Date: 2017-11-25 00:26+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: BiblioEteca Technologies SL <[email protected]>\n"
     
    1919"X-Poedit-SearchPath-0: .\n"
    2020
    21 #: nomorepass.php:28
     21#: nomorepass.php:36
     22msgid "Configuration"
     23msgstr "Configuración"
     24
     25#: nomorepass.php:37
     26msgid "Options to configure"
     27msgstr "Opciones a configurar"
     28
     29#: nomorepass.php:44
     30msgid "Show login form"
     31msgstr "Mostrar campos de login"
     32
     33#: nomorepass.php:53 nomorepass.php:67 nomorepass.php:81 nomorepass.php:95
     34msgid "NO"
     35msgstr "NO"
     36
     37#: nomorepass.php:54 nomorepass.php:68 nomorepass.php:82 nomorepass.php:96
     38msgid "YES"
     39msgstr "SI"
     40
     41#: nomorepass.php:56
     42msgid "Show the user / password fields?"
     43msgstr "¿Mostrar los campos de usuario y password en el formulario?"
     44
     45#: nomorepass.php:58
     46msgid "Show password reset"
     47msgstr "Mostrar campos en reset"
     48
     49#: nomorepass.php:70
     50msgid "Show the password field when resetting password?"
     51msgstr "¿Mostrar el campo de password cuando se genera uno nuevo?"
     52
     53#: nomorepass.php:72
     54msgid "Auto-launch QR"
     55msgstr "Lanzar QR automáticamente"
     56
     57#: nomorepass.php:84
     58msgid "Launch the QR on loading login page?"
     59msgstr "¿Lanzar el código QR automáticamente en la página de login?"
     60
     61#: nomorepass.php:86
     62msgid "Auto-login after registration"
     63msgstr "Auto-login tras el registro"
     64
     65#: nomorepass.php:98
     66msgid "Auto-login after registration?"
     67msgstr "¿Auto-login tras el registro?"
     68
     69#: nomorepass.php:103
     70msgid "More info"
     71msgstr "Más información"
     72
     73#: nomorepass.php:136 nomorepass.php:298
     74msgid "Send to NoMorePass"
     75msgstr "Enviar al móvil"
     76
     77#: nomorepass.php:174 nomorepass.php:348
     78msgid ""
     79"Click to scan with <a href=\"https://nomorepass.com\">NoMorePass</a> app and "
     80"receive the password directly on your mobile phone"
     81msgstr ""
     82"Haz click en el icono de <a href=\"https://nomorepass.com\">NoMorePass</a> y "
     83"escanea el QR para recibir en tu móvil la nueva contraseña"
     84
     85#: nomorepass.php:175
     86msgid "New pass for account"
     87msgstr "Nueva contraseña para la cuenta"
     88
     89#: nomorepass.php:193
    2290msgid "Enter using NoMorePass"
    2391msgstr "Entrar usando NoMorePass"
     92
     93#: nomorepass.php:194
     94msgid ""
     95"Click on <a href=\"https://nomorepass.com\">NoMorePass</a> icon and use the "
     96"qrcode to login"
     97msgstr ""
     98"Pulsa en el icono de <a href=\"https://nomorepass.com\">NoMorePass</a> y usa "
     99"tu móvil para hacer login"
     100
     101#: nomorepass.php:368
     102msgid "<strong>ERROR</strong>: Please, click the NoMorePass icon."
     103msgstr "<strong>ERROR</strong>: Por favor, pulse sobre el icono de NoMorePass."
     104
     105#~ msgid ""
     106#~ "Click to scan with NoMorePass app and receive the password directly on "
     107#~ "your mobile phone"
     108#~ msgstr ""
     109#~ "Haz click en el icono y escanea el QR para recibir en tu móvil la nueva "
     110#~ "contraseña"
  • nomorepass-forget-your-passwords/trunk/languages/nomorepass-it_IT.po

    r1675616 r1788073  
    55msgstr ""
    66"Project-Id-Version: nomorepass v1.0\n"
    7 "POT-Creation-Date: 2017-02-26 10:06+0100\n"
    8 "PO-Revision-Date: 2017-06-09 15:55+0200\n"
     7"POT-Creation-Date: 2017-11-25 00:26+0100\n"
     8"PO-Revision-Date: 2017-11-25 00:26+0100\n"
    99"Last-Translator: Night Train <[email protected]>\n"
    1010"Language-Team: Italiano <[email protected]>\n"
     
    1313"Content-Type: text/plain; charset=UTF-8\n"
    1414"Content-Transfer-Encoding: 8bit\n"
    15 "X-Generator: Gtranslator 2.91.6\n"
     15"X-Generator: Poedit 1.8.7.1\n"
    1616"X-Poedit-Basepath: ..\n"
    1717"Plural-Forms: nplurals=2; plural=(n != 1);\n"
     
    2222"X-Poedit-SearchPath-0: .\n"
    2323
    24 #: nomorepass.php:28
     24#: nomorepass.php:36
     25msgid "Configuration"
     26msgstr "Configurazione"
     27
     28#: nomorepass.php:37
     29msgid "Options to configure"
     30msgstr "Opzioni di configurazione"
     31
     32#: nomorepass.php:44
     33msgid "Show login form"
     34msgstr "Mostra campi di login"
     35
     36#: nomorepass.php:53 nomorepass.php:67 nomorepass.php:81 nomorepass.php:95
     37msgid "NO"
     38msgstr "Non"
     39
     40#: nomorepass.php:54 nomorepass.php:68 nomorepass.php:82 nomorepass.php:96
     41msgid "YES"
     42msgstr "Sì"
     43
     44#: nomorepass.php:56
     45msgid "Show the user / password fields?"
     46msgstr "Mostra i campi utente / password?"
     47
     48#: nomorepass.php:58
     49msgid "Show password reset"
     50msgstr "Mostra password in forma reset"
     51
     52#: nomorepass.php:70
     53msgid "Show the password field when resetting password?"
     54msgstr "Visualizzare il campo password quando si ripristina la password?"
     55
     56#: nomorepass.php:72
     57msgid "Auto-launch QR"
     58msgstr "Lancio automatico QR"
     59
     60#: nomorepass.php:84
     61msgid "Launch the QR on loading login page?"
     62msgstr "Visualizza il QR sul caricamento della pagina di login?"
     63
     64#: nomorepass.php:86
     65msgid "Auto-login after registration"
     66msgstr "Auto-login dopo la registrazione"
     67
     68#: nomorepass.php:98
     69msgid "Auto-login after registration?"
     70msgstr "Auto-login dopo la registrazione?"
     71
     72#: nomorepass.php:103
     73msgid "More info"
     74msgstr "Altre info"
     75
     76#: nomorepass.php:136 nomorepass.php:298
     77msgid "Send to NoMorePass"
     78msgstr "Invia al cellulare"
     79
     80#: nomorepass.php:174 nomorepass.php:348
     81msgid ""
     82"Click to scan with <a href=\"https://nomorepass.com\">NoMorePass</a> app and "
     83"receive the password directly on your mobile phone"
     84msgstr ""
     85"Clicca per eseguire la scansione con l' applicazione <a href=\"https://"
     86"nomorepass.com\">NoMorePass</a> e ricevi la password direttamente sul tuo "
     87"cellulare"
     88
     89#: nomorepass.php:175
     90msgid "New pass for account"
     91msgstr "Nuovo pass per conto"
     92
     93#: nomorepass.php:193
    2594msgid "Enter using NoMorePass"
    2695msgstr "Accedi con NoMorePass"
     96
     97#: nomorepass.php:194
     98msgid ""
     99"Click on <a href=\"https://nomorepass.com\">NoMorePass</a> icon and use the "
     100"qrcode to login"
     101msgstr ""
     102"Clicca sull'icona <a href=\"https://nomorepass.com\">NoMorePass</a> e usa il "
     103"qrcode per effettuare il login"
     104
     105#: nomorepass.php:368
     106msgid "<strong>ERROR</strong>: Please, click the NoMorePass icon."
     107msgstr "<strong>ERROR</strong>: Fare clic sull' icona NoMorePass."
     108
     109#~ msgid ""
     110#~ "Click to scan with NoMorePass app and receive the password directly on "
     111#~ "your mobile phone"
     112#~ msgstr ""
     113#~ "Clicca per eseguire la scansione con l' applicazione NoMorePass e ricevi "
     114#~ "la password direttamente sul tuo cellulare"
  • nomorepass-forget-your-passwords/trunk/nomorepass.php

    r1771325 r1788073  
    55Description: Plugin to allow login using NoMorePass app
    66Author: Jose A. Espinosa
    7 Version: 1.6.0
     7Version: 1.7.0
    88Author URI: https://www.yoprogramo.com
    9 Text Domain: nomorepass-forget-your-passwords
     9Text Domain: nomorepass
    1010Domain Path: /languages/
    1111*/
     
    1818add_action ('login_form',array('NoMorePass','showButton'));
    1919add_action ('login_enqueue_scripts',array('NoMorePass','enqueueScripts'));
     20add_action('admin_menu', 'nomorepass_plugin_setup_menu');
     21add_action('admin_init','nomorepass_settings');
     22add_action('user_register', array('NoMorePass','auto_login') );
     23add_action('register_form', array('NoMorePass','new_item_register_form'));
     24add_filter('registration_errors', array ('NoMorePass','registration_errors'), 10, 3 );
     25
     26
    2027load_plugin_textdomain( 'nomorepass', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     28
     29function nomorepass_plugin_setup_menu(){
     30       add_menu_page( 'NoMorePass', 'NoMorePass login', 'manage_options', 'nomorepass', 'nomorepass_admin_init', 'dashicons-admin-network' );
     31}
     32
     33function nomorepass_admin_init(){
     34    ?>
     35    <div class="wrap">
     36        <h2>NoMorePass <?php echo __('Configuration','nomorepass');?></h2>
     37        <p><?php echo __('Options to configure','nomorepass');?>:</p>
     38        <form method="post" action="options.php">
     39        <?php
     40            settings_fields ('nomorepass-login-group');
     41            do_settings_sections ('nomorepass-login-group');
     42        ?>
     43        <table><tr><td>
     44        <label><?php echo __('Show login form','nomorepass');?></label></td><td>
     45        <select id="nomorepass-show-form" name="nomorepass-show-form">
     46        <?php if (get_option('nomorepass-show-form',1)==0) {
     47            $selno="selected";
     48            $selsi="";
     49        } else {
     50            $selno="";
     51            $selsi="selected";
     52        } ?>
     53            <option value="0" <?php echo $selno;?> ><?php echo __('NO','nomorepass');?></option>
     54            <option value="1" <?php echo $selsi;?> ><?php echo __('YES','nomorepass');?></option>
     55        </select>
     56        <p class="description"><?php echo __('Show the user / password fields?','nomorepass');?></p>
     57        </td></tr><tr><td>
     58        <label><?php echo __('Show password reset','nomorepass');?></label></td><td>
     59        <select id="nomorepass-show-resetpass" name="nomorepass-show-resetpass">
     60        <?php if (get_option('nomorepass-show-resetpass')==0) {
     61            $selno="selected";
     62            $selsi="";
     63        } else {
     64            $selno="";
     65            $selsi="selected";
     66        } ?>
     67            <option value="0" <?php echo $selno;?> ><?php echo __('NO','nomorepass');?></option>
     68            <option value="1" <?php echo $selsi;?> ><?php echo __('YES','nomorepass');?></option>
     69        </select>
     70        <p class="description"><?php echo __('Show the password field when resetting password?','nomorepass');?></p>
     71        </td></tr><tr><td>
     72        <label><?php echo __('Auto-launch QR','nomorepass');?></label></td><td>
     73        <select id="nomorepass-auto-qr" name="nomorepass-auto-qr">
     74        <?php if (get_option('nomorepass-auto-qr',0)==0) {
     75            $selno="selected";
     76            $selsi="";
     77        } else {
     78            $selno="";
     79            $selsi="selected";
     80        } ?>
     81            <option value="0" <?php echo $selno;?> ><?php echo __('NO','nomorepass');?></option>
     82            <option value="1" <?php echo $selsi;?> ><?php echo __('YES','nomorepass');?></option>
     83        </select>
     84        <p class="description"><?php echo __('Launch the QR on loading login page?','nomorepass');?></p>
     85        </td></tr><tr><td>
     86        <label><?php echo __('Auto-login after registration','nomorepass');?></label></td><td>
     87        <select id="nomorepass-auto-login" name="nomorepass-auto-login">
     88        <?php if (get_option('nomorepass-auto-login',0)==0) {
     89            $selno="selected";
     90            $selsi="";
     91        } else {
     92            $selno="";
     93            $selsi="selected";
     94        } ?>
     95            <option value="0" <?php echo $selno;?> ><?php echo __('NO','nomorepass');?></option>
     96            <option value="1" <?php echo $selsi;?> ><?php echo __('YES','nomorepass');?></option>
     97        </select>
     98        <p class="description"><?php echo __('Auto-login after registration?','nomorepass');?></p>
     99        </td></tr>
     100        </table>
     101        <?php submit_button(); ?>
     102        </form>
     103        <h2><?php echo __('More info','nomorepass');?></h2>
     104        <a href ="https://nomorepass.com">NoMorePass.com</a>
     105
     106    </div>
     107    <?php
     108}
     109
     110function nomorepass_settings() {
     111    register_setting('nomorepass-login-group',
     112    'nomorepass-show-form',
     113    'intval');
     114    register_setting('nomorepass-login-group',
     115    'nomorepass-show-resetpass',
     116    'intval');
     117    register_setting('nomorepass-login-group',
     118    'nomorepass-auto-qr',
     119    'intval');
     120    register_setting('nomorepass-login-group',
     121    'nomorepass-auto-login',
     122    'intval');
     123   
     124}
     125
     126
    21127
    22128class NoMorePass {
     
    28134        // Shows the NMP button under reset password button
    29135        ?><p style="display: block;width: 100%;text-align: center;">
    30         <a href="javascript:sendpassword()"><img src="<?php echo plugins_url('public/images/ico-36.png', __FILE__)?>" title="<?php echo __('Send to NoMorePass','nomorepass-forget-your-passwords')?>" /></a></p>
     136        <a href="javascript:sendpassword()"><img src="<?php echo plugins_url('public/images/ico-36.png', __FILE__)?>" title="<?php echo __('Send to NoMorePass','nomorepass')?>" /></a></p>
    31137        <div id="qrcodecont" style="position: absolute; width: 300px; height: 300px; opacity: 1; z-index: 2147483647; background: rgb(255, 255, 255); top: 0px; bottom: 0px; left: 0px; right: 0px; margin: auto; border: 1px solid black; display:none;"><span id="nmp_close" style="float:right;display:inline-block;padding:2px 5px;background:#ccc;" onclick="hideQr()">x</span><div id="qrcode" style="margin: 22px;"></div></div>
    32138        <script>
     
    66172            );
    67173        }
     174        document.querySelector(".indicator-hint").innerHTML='<?php echo __('Click to scan with <a href="https://nomorepass.com">NoMorePass</a> app and receive the password directly on your mobile phone','nomorepass');?>';
     175        document.querySelector(".reset-pass").innerHTML='<?php echo __('New pass for account','nomorepass');?>';
     176        <?php
     177            $showform = get_option('nomorepass-show-resetpass',1);
     178            if ($showform==0) {
     179                ?>// hidding fields
     180            document.querySelector(".user-pass1-wrap").style.display="none";
     181            window.onload = function () {
     182                document.querySelector("#wp-submit").style.display="none";
     183            }
     184                <?php
     185            }
     186        ?>
    68187        </script>
    69188        <?php
     
    72191        // Shows the NMP button under login window
    73192        ?><p style="display: block;width: 100%;text-align: center;">
    74         <a href="javascript:getpassword()"><img src="<?php echo plugins_url('public/images/ico-36.png', __FILE__)?>" title="<?php echo __('Enter using NoMorePass','nomorepass-forget-your-passwords')?>" /></a></p>
     193        <a href="javascript:getpassword()"><img src="<?php echo plugins_url('public/images/ico-36.png', __FILE__)?>" title="<?php echo __('Enter using NoMorePass','nomorepass')?>" /></a></p>
     194        <p><?php echo __('Click on <a href="https://nomorepass.com">NoMorePass</a> icon and use the qrcode to login','nomorepass');?></p>
    75195        <div id="qrcodecont" style="position: absolute; width: 300px; height: 300px; opacity: 1; z-index: 2147483647; background: rgb(255, 255, 255); top: 0px; bottom: 0px; left: 0px; right: 0px; margin: auto; border: 1px solid black; display:none;"><span id="nmp_close" style="float:right;display:inline-block;padding:2px 5px;background:#ccc;" onclick="hideQr()">x</span><div id="qrcode" style="margin: 22px;"></div></div>
    76196        <script>
     
    105225                });
    106226            }
     227        <?php
     228            $showform = get_option('nomorepass-show-form',1);
     229            if ($showform==0) {
     230                ?>// hidding fields
     231            var tohide=document.querySelectorAll('form label');
     232            for (var i =0; i< tohide.length;i++) tohide[i].style.display='none';
     233            window.onload = function () {
     234                document.querySelector(".submit").style.display="none";
     235            }
     236                <?php
     237            }
     238            $auto = get_option ('nomorepass-auto-qr',0);
     239            if ($auto==1) {
     240                ?>
     241                getpassword();
     242                <?php
     243            }
     244        ?>
    107245        </script>
    108246        <?php
     
    121259        wp_enqueue_script('nomorepass_script');
    122260    }
    123 }
     261
     262    // Auto-login
     263    public static function auto_login ( $user_id ) {
     264        if (get_option("nomorepass-auto-login",0)==1) {
     265            // El password viene en el campo password1 que se añadió al registro.
     266            wp_set_password( $_POST['password1'], $user_id );
     267   
     268            wp_set_current_user($user_id);
     269            wp_set_auth_cookie($user_id);
     270           
     271            global $_POST;
     272            if ($_POST['redirect_to'] == "") {
     273                $redirect = get_home_url();
     274                $redirect .= "/wp-admin/profile.php";               
     275            } else {
     276                $redirect = $_POST['redirect_to'];
     277            }
     278   
     279            wp_redirect($redirect);
     280   
     281            wp_new_user_notification($user_id, null, 'both'); //'admin' or blank sends admin notification email only. Anything else will send admin email and user email
     282   
     283            exit;
     284        }
     285    }
     286
     287    public static function new_item_register_form() {
     288       
     289        if (get_option("nomorepass-auto-login",0)==1) {
     290            // Bien venía el pass de antes, bien lo generamos nosotros.
     291            $password1 = ( ! empty( $_POST['password1'] ) ) ? trim( $_POST['password1'] ) :  wp_generate_password();
     292            ?>
     293            <p class="user-pass1-wrap">
     294                <input type="hidden" name="password1" id="password1" class="input" value="<?php echo esc_attr( wp_unslash( $password1 ) ); ?>" size="25" /></label>
     295                <input type="hidden" name="qrisok" id="qrisok" value="NO"/>
     296            </p>
     297            <p style="display: block;width: 100%;text-align: center;">
     298            <a href="javascript:sendpassword()"><img src="<?php echo plugins_url('public/images/ico-36.png', __FILE__)?>" title="<?php echo __('Send to NoMorePass','nomorepass')?>" /></a></p>
     299            <div id="qrcodecont" style="position: absolute; width: 300px; height: 300px; opacity: 1; z-index: 2147483647; background: rgb(255, 255, 255); top: 0px; bottom: 0px; left: 0px; right: 0px; margin: auto; border: 1px solid black; display:none;"><span id="nmp_close" style="float:right;display:inline-block;padding:2px 5px;background:#ccc;" onclick="hideQr()">x</span><div id="qrcode" style="margin: 22px;"></div></div>
     300            <script>
     301            function hideQr() {
     302                NomorePass.stopped=true;
     303                document.querySelector("#qrcodecont").style.display='none';
     304            }
     305            function sendpassword() {
     306                // Generate QR to receive the data
     307                var qrelement = document.querySelector('#qrcode');
     308                NomorePass.init();
     309                var user = document.querySelector('#user_login').value;
     310                var pass = document.querySelector('#password1').value;
     311                var email = document.querySelector('#user_email').value;
     312                if (user.length==0) {
     313                    document.querySelector('#user_login').focus();
     314                    return;
     315                }
     316                if (email.length==0) {
     317                    document.querySelector('#user_email').focus();
     318                    return;
     319                }
     320                NomorePass.getQrSend (window.location.hostname,user,pass,{type:'pwd'},
     321                    function (text){
     322                        if (text==false){
     323                            alert("Error calling nmp");
     324                        } else {
     325                            // Show the qr with this text
     326                            qrelement.innerHTML="";
     327                            qrelement.style.display="block";
     328                            new QRCode(qrelement, text);
     329                            qrelement.onclick=function(e){
     330                                window.open(text,'_system');
     331                            };
     332                            document.querySelector("#qrcodecont").style.display='block';
     333                            // wait to be scanned and received
     334                            // by the app
     335                            NomorePass.send (function(data){
     336                                qrelement.innerHTML="<p>Password received</p>";
     337                                hideQr();
     338                                document.querySelector('#qrisok').value = "SI";
     339                                document.querySelector('#wp-submit').click();
     340
     341                            })
     342                        }
     343                    }
     344                );
     345            }
     346            document.querySelector(".user-pass1-wrap").style.display="none";
     347            window.onload = function () {
     348                document.querySelector("#reg_passmail").innerHTML='<?php echo __('Click to scan with <a href="https://nomorepass.com">NoMorePass</a> app and receive the password directly on your mobile phone','nomorepass');?>';
     349                document.querySelector(".submit").style.display='none';
     350                document.onkeypress = stopRKey;
     351                function stopRKey(evt) {
     352                    var evt = (evt) ? evt : ((event) ? event : null);
     353                    var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
     354                    if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
     355                }
     356            }
     357
     358            </script>
     359                </p>
     360            <?php
     361        }
     362   
     363    }
     364    public static function registration_errors( $errors, $sanitized_user_login, $user_email ) {
     365       
     366        if (get_option("nomorepass-auto-login",0)==1) {
     367            if ( empty( $_POST['qrisok'] ) || ! empty( $_POST['qrisok'] ) && trim( $_POST['qrisok'] ) != 'SI' ) {
     368                $errors->add( 'qr_error', __( '<strong>ERROR</strong>: Please, click the NoMorePass icon.', 'nomorepass' ) );
     369            }
     370        }
     371   
     372        return $errors;
     373    }
     374}
  • nomorepass-forget-your-passwords/trunk/public/js/nomorepass.js

    r1771325 r1788073  
    179179    },
    180180    ping: function (data,callback){
     181        if (NomorePass.stopped){
     182            NomorePass.stopped = false;
     183        }
    181184        var ticket=data.substring(12);
    182185        NomorePass.post(NomorePass.config.pingUrl,{'device': 'WEBDEVICE',
  • nomorepass-forget-your-passwords/trunk/readme.txt

    r1771325 r1788073  
    1 === Plugin Name ===
     1=== NoMorePass Login ===
    22Contributors: biblioeteca
    3 Donate link: www.biblioeteca.com/biblioeteca.web/dona
     3Donate link: https://www.biblioeteca.com/biblioeteca.web/dona
    44Tags: password, login, nomorepass, wordpress login, wp login form, wp-login, clef, two-factor, clef replacement, password manager, safe login, qr login
    55Requires at least: 3.5
    6 Tested up to: 4.9.0
    7 Stable tag: 1.6.0
     6Tested up to: 4.9.1
     7Stable tag: 1.7.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Use your mobile phone to login into wordpress. Perfect replacement for Clef plugin
     11Use your mobile phone to login into wordpress. Allow users instant registration.
    1212
    1313== Description ==
    14 <strong>NoMorePass</strong> is a secure and easy to use technology to provide you two factor autentication on every situation. This plugin allows you to login to wordpress using just your mobile phone, with no otre requirement. No registering, no API keys, no configuration.
     14<strong>NoMorePass</strong> is a secure and easy to use technology to provide you two factor autentication on every situation. This plugin allows you to login to wordpress using just your mobile phone, with no other requirement. No registering, no API keys, install, activate and that's all.
     15Your passwords will be <strong>only on your mobile phone</strong>, no copies over your computers, not even on nomorepass servers, fully anonymous. Login just scanning a one-time qr-code.
    1516
    1617* <strong>Safe</strong> Your passwords are encrypted all the time, all transfers are on https and the credentials are encrypted with single-use keys.
    17 * <strong>Personal</strong> Your passwords always go with you. No servers, no insecure transfers, no browser dependencies.
    18 * <strong>Easy</strong> Magic! You can send passwords to your favorite websites without any effort. Just select it on your mobile.
     18* <strong>Personal</strong> Your passwords always go with you. No servers, no insecure transfers, no browser dependencies. Fully anonymous.
     19* <strong>Easy</strong> Magic! You can send passwords to your favorite websites without any effort. Just scan a qr-code with the app.
    1920
    20 Use the NoMorePass app in your smartphone:
     21<strong>IMPORTANT</strong>: Install the app in your phone:
    2122
    2223* [Google Play](https://play.google.com/store/apps/details?id=com.biblioeteca.apps.NoMorePass) Android.
    2324* [Apple Appstore](https://itunes.apple.com/us/app/no-more-pass/id1199780162) iOS
    2425
    25 <strong>NoMorePass plugin is  well tested,
     26<strong>Instant user registration</strong>
     27You have a new configuration option named "Auto-login after registration" that allows your users scan the provided qr-code only providing username and email, then the password is sent to the mobile phone and the user is registered immediately.
     28Register your users in just one step, safely.
     29
     30<strong>NoMorePass support</strong>,
    2631if you find a bug please open a ticket in the support request or go to [NoMorePass.com](https://www.nomorepass.com).
    2732Every issue will be fixed asap!</strong>
     
    6772More info on [NoMorePass.com](https://www.nomorepass.com).
    6873
     74== Configuration ==
     75
     76In the admin page you have 4 different options:
     77
     781. Show login form : shows or hide the user and password fields. If hidden only using QR is possible login.
     791. Show password reset : shows or hide the password field when resetting password. If hidden the password is sent to the mobile phone using QR directly.
     801. Auto-launch QR : makes the NoMorePass QR be launched when login page loads.
     811. Auto-login : if you select this option the user will login directly after the registration without email verification. Use with caution, this option will reduce the registration dramatically (just 1 step) but the emails are not verified (but you know people registered have used nomorepass, so they are humans).
     82
    6983== Frequently Asked Questions ==
    7084
    7185= Do I need the mobile app? =
    7286
    73 Yes.
     87Yes. But you can login using username and password too depending on the configuration you choose.
    7488
    7589= It is the app free? =
    7690
    77 Yes.
     91Yes. See [NoMorePass.com Prices] (https://www.nomorepass.com/wp/tarifas/?lang=en)
     92
     93= May I remove the plugin? =
     94
     95Yes, you can and your user credentials remain untouched.
     96
     97= What if I loose my phone? =
     98
     99You can make a backup for your mobile phone credentials and restore in a new install, see app instructions.
    78100
    79101== Screenshots ==
     
    821042. Decorated Login
    831053. No More Pass working
     1064. Configuration page
     1075. Login without username / password
     1086. Auto-registration enabled
    84109
    85110== How it works ==
     
    88113
    89114== Changelog ==
     115
     116= 1.7.0 =
     117* New configuration screen
     118* New modes (show only QR - auto-launch qr)
     119* Auto-login after registration
     120* Automatic registration using NoMorePass
     121* Tested Wordpress 4.9.1
    90122
    91123= 1.6.0 =
Note: See TracChangeset for help on using the changeset viewer.