add user CRUD

This commit is contained in:
2015-09-19 08:29:47 +02:00
parent 271835ae6b
commit 5163f1a9a9
15 changed files with 653 additions and 14 deletions

View File

@@ -185,4 +185,20 @@ class User extends ActiveRecord implements IdentityInterface
{
$this->password_reset_token = null;
}
static function statuses() {
return [
self::STATUS_ACTIVE => Yii::t('app', 'Aktív'),
self::STATUS_DELETED => Yii::t('app', 'Inaktív'),
] ;
}
public function getStatusHuman(){
$result = null;
$s = self::statuses($this->status);
if ( array_key_exists($this->status, $s)){
$result = $s[$this->status];
}
return $result;
}
}