public function create() { if ($this->validate() == false) { return false; } $siteuser = new Siteuser(); $siteuser->username = $this->username; $siteuser->email = $this->email; $siteuser->setPassword($this->password); return $siteuser->save(false); }
/** * @return ActiveQuery */ public function getAuthor() { return $this->hasOne(Siteuser::className(), ['id' => 'creator']); }
public function actionIndex() { return $this->render('index', ['siteusersDataProvider' => new ActiveDataProvider(['query' => Siteuser::find()])]); }