simple form for adding a user to the database, only available for admin users.

This commit is contained in:
Naomi 2010-12-17 17:56:01 -05:00
parent 2830137d23
commit 1fc21819cc
30 changed files with 445 additions and 222 deletions

View file

@ -0,0 +1,36 @@
<?php
class UserController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
}
public function addUserAction()
{
$request = $this->getRequest();
$form = new Application_Form_AddUser();
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
$formdata = $form->getValues();
User::addUser($formdata);
$form->reset();
}
}
$this->view->form = $form;
}
}