Fixed problem with status and level updates in user profiles
Esse commit está contido em:
@@ -13,7 +13,7 @@
|
|||||||
class MindUser
|
class MindUser
|
||||||
{
|
{
|
||||||
static protected $dbConn = false;
|
static protected $dbConn = false;
|
||||||
static protected $validAttrs = Array('name', 'email', 'pwd');
|
static protected $validAttrs = Array('name', 'email', 'pwd', 'status', 'type');
|
||||||
static protected $adminValidAttrs = Array('status', 'type');
|
static protected $adminValidAttrs = Array('status', 'type');
|
||||||
|
|
||||||
protected static function hash($pwd)
|
protected static function hash($pwd)
|
||||||
@@ -31,8 +31,10 @@ class MindUser
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!\in_array($attr, self::$validAttrs))
|
if(!\in_array($attr, self::$validAttrs)){
|
||||||
|
\Mind::write('invalidCreateParams');
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if($attr == 'pwd')
|
if($attr == 'pwd')
|
||||||
$value= self::hash($value);
|
$value= self::hash($value);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
\MindUser::set($property, $this->value);
|
\MindUser::set($property, $this->value);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
\MindUser::set($property, $this->value);
|
|
||||||
}
|
}
|
||||||
/*if($this->whose == 'user')
|
/*if($this->whose == 'user')
|
||||||
{
|
{
|
||||||
|
|||||||
Referência em uma Nova Issue
Bloquear um usuário