/** * Creates a User */ public function createAction() { if ($this->request->isPost()) { $user = new Users(); $user->assign(array('first_name' => $this->request->getPost('first_name', 'striptags'), 'last_name' => $this->request->getPost('last_name', 'striptags'), 'username' => $this->request->getPost('username', 'striptags'), 'email' => $this->request->getPost('email', 'email'))); $this->flash->notice(\Dsc\Lib\Debug::dump($user)); if (!$user->save()) { $this->flash->error($user->getMessages()); } else { $this->flash->success("User was created successfully"); Tag::resetInput(); } } $this->view->form = new UsersForm(null); $this->view->disable(); $this->view->event = \Dsc\Lib\System::instance()->trigger('onDisplayAdminUserEdit', array('item' => array(), 'tabs' => array(), 'content' => array())); echo $this->theme->renderTheme('Admin/Views::Users/create'); }
<?php // breadcrumb? ?> </div> <!-- #ribbon --> <div id="content"> <tmpl type="system.messages" /> <tmpl type="view" /> <div class='clearfix'> <h3>Debugging Data (in Theme/index.php)</h3> <?php echo \Dsc\Lib\Debug::dump(\Dsc\Lib\System::instance()->getSessionRegistry()); ?> </div> </div> <!-- #content --> </div> <!-- #main --> <?php // echo $this->renderView('Admin/Views::footer'); ?> <?php echo $this->renderView('Admin/Views::js_footer'); ?>