コード例 #1
0
ファイル: index.php プロジェクト: nathanhammond/htpasswdgen
 public function edit(&$user, &$pass)
 {
     if (!valid::user($user)) {
         $this->error = 'This user does not already exist.';
         return false;
     }
     if (!$this->exists($user)) {
         $this->error = 'This user does not already exist.';
         return false;
     }
     if (!valid::pass($pass)) {
         $this->error = 'This is not a valid password.';
         return false;
     }
     return $this->delete($user) && $this->add($user, $pass);
 }