Module: appdb Branch: master Commit: c628c926fe5e37dda1631aff4d8f56b9401269a4 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=c628c926fe5e37dda1631aff4...
Author: Alexander N. Sørnes alexsornes@gmail.com Date: Tue Sep 27 12:15:54 2011 +0200
User: replace deprecated ereg calls with preg
---
include/user.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/user.php b/include/user.php index b7cb192..4ebd925 100644 --- a/include/user.php +++ b/include/user.php @@ -456,7 +456,7 @@ class User { while (strlen($nps)<$pass_len) { $c = chr(mt_rand (0,255)); - if (eregi("^[a-z0-9]$", $c)) $nps = $nps.$c; + if (preg_match("/[a-zA-Z0-9]/", $c)) $nps = $nps.$c; } return ($nps); }