dolibarr 21.0.0-alpha
modCaptchaStandard.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 * or see https://www.gnu.org/
18 */
19
26require_once DOL_DOCUMENT_ROOT.'/core/modules/security/captcha/modules_captcha.php';
27
28
33{
37 public $id;
38
39 public $picto = 'fa-shield-alt';
40
49 public function __construct($db, $conf, $langs, $user)
50 {
51 $this->id = "standard";
52
53 $this->db = $db;
54 $this->conf = $conf;
55 $this->langs = $langs;
56 $this->user = $user;
57 }
58
64 public function getDescription()
65 {
66 global $langs;
67 return $langs->trans("DolibarrStandardCaptcha");
68 }
69
75 public function getExample()
76 {
77 return '';
78 }
79
80
88 {
89 return 1;
90 }
91}
Parent class for password rules/management modules.
Class to generate a password according to a dolibarr standard rule (12 random chars)
validateCodeAfterLoginSubmit()
Validate a captcha This function is called after a log to validate a captcha, before validating a pas...
__construct($db, $conf, $langs, $user)
Constructor.
getDescription()
Return description of module.
getExample()
Return an example of password generated by this module.
conf($dolibarr_main_document_root)
Load conf file (file must exists)
Definition inc.php:420
$conf db user
Active Directory does not allow anonymous connections.
Definition repair.php:141