dolibarr 20.0.0
modGeneratePassNone.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/generate/modules_genpassword.php';
27
28
33{
37 public $id;
38
39 public $picto = 'fa-keyboard';
40
49 public function __construct($db, $conf, $langs, $user)
50 {
51 $this->id = "none";
52 $this->length = '0';
53 $this->length2 = 0;
54
55 $this->db = $db;
56 $this->conf = $conf;
57 $this->langs = $langs;
58 $this->user = $user;
59 }
60
66 public function getDescription()
67 {
68 global $langs;
69 return $langs->trans("PasswordGenerationNone");
70 }
71
77 public function getExample()
78 {
79 return $this->langs->trans("None");
80 }
81
87 public function getNewGeneratedPassword()
88 {
89 return "";
90 }
91
99 public function validatePassword($password)
100 {
101 return 1;
102 }
103}
Parent class for password rules/management modules.
Class to generate a password according to rule 'no password'.
__construct($db, $conf, $langs, $user)
Constructor.
getExample()
Return an example of password generated by this module.
validatePassword($password)
Validate a password.
getDescription()
Return description of module.
getNewGeneratedPassword()
Build new password.
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