}
public function setpwd ($user_name, $pwd) {
+ if (strlen ($pwd) == 0) {
+ throw new Exception (anydbConnection::err_query);
+ }
$usrname_escaped = mysql_real_escape_string ($user_name);
if ($this->user_exists ($user_name)) {
$query = sprintf ("UPDATE %susers SET pwd='%s' WHERE name like '%s';",