Revision 1378
Added by Dietmar almost 14 years ago
class.wb.php | ||
---|---|---|
29 | 29 |
class wb extends SecureForm |
30 | 30 |
{ |
31 | 31 |
|
32 |
var $password_chars = 'a-zA-Z0-9\_\-\!\#\*\+';
|
|
32 |
private $password_chars = 'a-zA-Z0-9\_\-\!\#\*\+';
|
|
33 | 33 |
// General initialization function |
34 | 34 |
// performed when frontend or backend is loaded. |
35 | 35 |
|
36 |
function wb() {
|
|
37 |
parent::__construct(); |
|
36 |
public function __construct($mode = SecureForm::Frontend) {
|
|
37 |
parent::__construct($mode);
|
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
/* **************** |
... | ... | |
290 | 290 |
$email = $IDN->encode($email); |
291 | 291 |
unset($IDN); |
292 | 292 |
} |
293 |
return !(filter_var($email, FILTER_VALIDATE_EMAIL) == false); |
|
293 |
// regex from NorHei 2011-01-11 |
|
294 |
$retval = preg_match("/^((([!#$%&'*+\\-\/\=?^_`{|}~\w])|([!#$%&'*+\\-\/\=?^_`{|}~\w][!#$%&'*+\\-\/\=?^_`{|}~\.\w]{0,}[!#$%&'*+\\-\/\=?^_`{|}~\w]))[@]\w+(([-.]|\-\-)\w+)*\.\w+(([-.]|\-\-)\w+)*)$/", $email); |
|
295 |
return ($retval != false); |
|
294 | 296 |
} |
295 | 297 |
|
296 | 298 |
/* **************** |
Also available in: Unified diff
fixed inclusion of SecureForm
added IDNA/Punycode to wb::validate_email()