PluginProbe
DoLogin Security / 4.1
DoLogin Security v4.1
5.0.10 4.8.3 trunk 1.0 1.1 1.1.1 1.2 1.2.1 1.2.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 1.6 All 64 releases
dologin / dologin.php

dologin.php in DoLogin Security 4.1, at dologin.php

77 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: DoLogin Security
5 * Description: Passwordless login. 2FA verification login. GeoLocation (Continent/Country/City) or IP range to limit login attempts. Support Whitelist and Blacklist. Support WooCommerce. Login attempt limit. CLI supported for generating passwordless login.
6 * Version: 4.1
7 * Author: WPDO
8 * WC requires at least: 1.0.0
9 * WC tested up to: 9.8.5
10 * License: GPLv3
11 * License URI: http://www.gnu.org/licenses/gpl.html
12 * Text Domain: dologin
13 * Domain Path: /lang
14 *
15 * Copyright (C) 2025 WPDO
16 *
17 * This program is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 3 of the License, or
20 * (at your option) any later version.
21 *
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License
28 * along with this program. If not, see <http://www.gnu.org/licenses/>.
29
30 */
31 defined('WPINC') || exit;
32
33 if (defined('DOLOGIN_V')) {
34 return;
35 }
36
37 define('DOLOGIN_V', '4.1');
38
39 !defined('DOLOGIN_DIR') && define('DOLOGIN_DIR', __DIR__ . '/'); // Full absolute path '/usr/local/***/wp-content/plugins/dologin/' or MU
40 !defined('DOLOGIN_PLUGIN_URL') && define('DOLOGIN_PLUGIN_URL', plugin_dir_url(__FILE__)); // Full URL path '//example.com/wp-content/plugins/dologin/'
41
42 !defined('DOLOGIN_LOGO') && define('DOLOGIN_LOGO', '<img src="' . DOLOGIN_PLUGIN_URL . 'assets/shield.svg" class="dologin-logo" style="max-width:50px;max-height:37px;"> ');
43
44 require_once DOLOGIN_DIR . 'autoload.php';
45
46 // Define CLI
47 if ((defined('WP_CLI') && WP_CLI) || PHP_SAPI == 'cli') {
48 !defined('DOLOGIN_CLI') && define('DOLOGIN_CLI', true);
49
50 // Register CLI cmd
51 if (method_exists('WP_CLI', 'add_command')) {
52 WP_CLI::add_command('dologin', 'dologin\CLI');
53 }
54 }
55
56 /**
57 * API for external plugin usage
58 * @since 1.4.1
59 */
60 if (!function_exists('dologin_gen_link')) {
61 function dologin_gen_link($src, $uid = false)
62 {
63 if (!$uid) {
64 $user = wp_get_current_user();
65 } else {
66 $user = get_user_by('id', (int) $uid);
67 }
68
69 $uid = $user->ID;
70 $src .= '-' . $user->display_name;
71
72 return \dologin\Pswdless::cls()->gen_link($src, $uid, true);
73 }
74 }
75
76 \dologin\Core::cls();
77