function signupAction() { $this->_helper->layout->setLayout('layout-newhukumonlineid-daftar'); $this->view->identity = 'Daftar'; $r = $this->getRequest(); if ($r->isPost()) { $fullName = $r->getParam('fullname'); $username = $r->getParam('username'); $password = $r->getParam('password'); $email = $r->getParam('email'); $package = $r->getParam('aro_groups'); $kopel = $this->generateKopel(); $obj = new Kutu_Crypt_Password(); $data = array('kopel' => $kopel, 'username' => $username, 'password' => $obj->encryptPassword($password), 'fullName' => $fullName, 'email' => $email, 'packageId' => $package, 'periodeId' => 1, 'createdDate' => date('Y-m-d H:i:s'), 'createdBy' => $username); $modelUser = new Kutu_Core_Orm_Table_User(); $modelUser->insert($data); $this->updateKopel(); $acl = new Kutu_Acl_Adapter_Local(); //$acl->addUser($username,"Free"); $acl->addUserToGroup($username, "Free"); $formater = new Kutu_Core_Hol_User(); $mailcontent = $formater->getMailContent('konfirmasi email gratis'); $m = $formater->_writeConfirmFreeEmail($mailcontent, $fullName, $username, $password, base64_encode($kopel), $email, 'gratis'); $this->view->message = $m; } $tblCatalog = new Kutu_Core_Orm_Table_Catalog(); $rowset = $tblCatalog->fetchRow("shortTitle='halaman-depan-login' AND status=99"); if (!empty($rowset)) { $rowsetCatalogAttribute = $rowset->findDependentRowsetCatalogAttribute(); $fixedContent = $rowsetCatalogAttribute->findByAttributeGuid('fixedContent')->value; } else { $fixedContent = ''; } $this->view->content = $fixedContent; }
public function signup($aData) { $row = $this->save($aData); //Must also assign assign user as group:member_free $acl = new Kutu_Acl_Adapter_Local(); $acl->addUserToGroup($row->username, "member_gratis"); if ($row->packageId == 27) { } elseif ($row->packageId == 26) { } else { $mailcontent = $this->getMailContent('konfirmasi email gratis'); $this->_writeConfirmFreeEmail($mailcontent, $row->fullName, $row->username, $aData['password'], $row->guid, $row->email, 'gratis'); } }
function migrationUser() { $data = $this->transformMigrationUser($_POST); /* echo '<pre>'; print_r($data); echo '</pre>'; * */ $modelUser = new Kutu_Core_Orm_Table_User(); $rowUser = $modelUser->fetchRow("username='******'username'] . "'"); if (!$rowUser) { $modelUser->insert($data); $this->updateKopel(); $groupName = $this->getGroupName($_POST['packageId']); $acl = new Kutu_Acl_Adapter_Local(); //$acl->addUser($_POST['username'],$groupName); $acl->addUserToGroup($_POST['username'], $groupName); } }