dolibarr  7.0.0-beta
modGeneratePassNone.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  * or see http://www.gnu.org/
17  */
18 
25 require_once DOL_DOCUMENT_ROOT .'/core/modules/security/generate/modules_genpassword.php';
26 
27 
33 {
34  var $id;
35  var $length;
36 
37  var $db;
38  var $conf;
39  var $lang;
40  var $user;
41 
42 
51  function __construct($db, $conf, $langs, $user)
52  {
53  $this->id = "none";
54  $this->length = 0;
55 
56  $this->db=$db;
57  $this->conf=$conf;
58  $this->langs=$langs;
59  $this->user=$user;
60  }
61 
67  function getDescription()
68  {
69  global $langs;
70  return $langs->trans("PasswordGenerationNone");
71  }
72 
78  function getExample()
79  {
80  return $this->langs->trans("None");
81  }
82 
89  {
90  return "";
91  }
92 
99  function validatePassword($password)
100  {
101  return 1;
102  }
103 
104 }
105 
Parent class for password rules/management modules.
conf($dolibarr_main_document_root)
Load conf file (file must exists)
Definition: inc.php:282
getExample()
Return an example of password generated by this module.
getNewGeneratedPassword()
Build new password.
__construct($db, $conf, $langs, $user)
Constructor.
$conf db user
Definition: repair.php:105
validatePassword($password)
Validate a password.
getDescription()
Return description of module.
Class to generate a password according to rule 'no password'.