Fixed horrible bugs in UserPhangoModel
This commit is contained in:
parent
1d6d07ca31
commit
4bee86860c
1 changed files with 19 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ class UserPhangoModel extends Webmodel {
|
|||
|
||||
}
|
||||
|
||||
if(trim($post['password'])!='')
|
||||
{
|
||||
|
||||
$this->components[$this->password]->protected=false;
|
||||
|
||||
}
|
||||
|
||||
return parent::insert($post, $safe_query, $cache_name);
|
||||
|
||||
}
|
||||
|
|
@ -95,6 +102,14 @@ class UserPhangoModel extends Webmodel {
|
|||
$this->components[$this->password]->required=0;
|
||||
unset($post[$this->password]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$this->components[$this->password]->protected=false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return parent::update($post, $safe_query, $cache_name);
|
||||
|
|
@ -153,10 +168,14 @@ class UserPhangoModel extends Webmodel {
|
|||
|
||||
}
|
||||
|
||||
$old_conditions=$this->conditions;
|
||||
|
||||
$this->set_conditions($where_sql);
|
||||
|
||||
$c=$this->select_count();
|
||||
|
||||
$this->conditions=$old_conditions;
|
||||
|
||||
if($c==0)
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue