}
}
- if (count($error_detected) == 0) {
+ if (count($error_detected) === 0) {
$files_res = $member->handleFiles($_FILES);
if (is_array($files_res)) {
$error_detected = array_merge($error_detected, $files_res);
}
}
- if (count($error_detected) == 0) {
+ if (count($error_detected) === 0) {
if (isset($args['self'])) {
$redirect_url = $this->router->pathFor('login');
} elseif (
|| trim($size) == ''
|| !is_int($size)
) {
- $size = self::DEFAULT_SIZE;
+ $size = static::DEFAULT_SIZE;
}
$pass = '';
$i = 0;
while ($i <= $size - 1) {
- $num = mt_rand(0, 32) % 33;
+ $num = mt_rand(0, strlen($this->chars) - 1) % strlen($this->chars);
$pass .= substr($this->chars, $num, 1);
$i++;
}
public const TABLE = 'tmppasswds';
public const PK = Adherent::PK;
+ /** @var integer Overrides default password size */
+ public const DEFAULT_SIZE = 50;
+ /** @var string Overrides default character set */
+ protected $chars = 'abcdefghjkmnpqrstuvwxyz0123456789&@{[]}%#+*:ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+
private $zdb;
/**