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

@ -63,6 +63,10 @@
<controllerFile controllerName="Api"> <controllerFile controllerName="Api">
<actionMethod actionName="index"/> <actionMethod actionName="index"/>
</controllerFile> </controllerFile>
<controllerFile controllerName="User">
<actionMethod actionName="index"/>
<actionMethod actionName="addUser"/>
</controllerFile>
</controllersDirectory> </controllersDirectory>
<formsDirectory> <formsDirectory>
<formFile formName="Login"/> <formFile formName="Login"/>
@ -72,6 +76,7 @@
<formFile formName="EditAudioMD"/> <formFile formName="EditAudioMD"/>
<formFile formName="AddShow"/> <formFile formName="AddShow"/>
<formFile formName="ScheduleShow"/> <formFile formName="ScheduleShow"/>
<formFile formName="AddUser"/>
</formsDirectory> </formsDirectory>
<layoutsDirectory enabled="false"/> <layoutsDirectory enabled="false"/>
<modelsDirectory/> <modelsDirectory/>
@ -198,6 +203,12 @@
<viewControllerScriptsDirectory forControllerName="Schedule"> <viewControllerScriptsDirectory forControllerName="Schedule">
<viewScriptFile forActionName="clearShow"/> <viewScriptFile forActionName="clearShow"/>
</viewControllerScriptsDirectory> </viewControllerScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="User">
<viewScriptFile forActionName="index"/>
</viewControllerScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="User">
<viewScriptFile forActionName="addUser"/>
</viewControllerScriptsDirectory>
</viewScriptsDirectory> </viewScriptsDirectory>
<viewHelpersDirectory/> <viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/> <viewFiltersDirectory enabled="false"/>
@ -239,6 +250,7 @@
<testApplicationControllerFile filesystemName="LoginControllerTest.php"/> <testApplicationControllerFile filesystemName="LoginControllerTest.php"/>
<testApplicationControllerFile filesystemName="ScheduleControllerTest.php"/> <testApplicationControllerFile filesystemName="ScheduleControllerTest.php"/>
<testApplicationControllerFile filesystemName="ApiControllerTest.php"/> <testApplicationControllerFile filesystemName="ApiControllerTest.php"/>
<testApplicationControllerFile filesystemName="UserControllerTest.php"/>
</testApplicationControllerDirectory> </testApplicationControllerDirectory>
</testApplicationDirectory> </testApplicationDirectory>
<testLibraryDirectory> <testLibraryDirectory>

View file

@ -10,6 +10,7 @@ $ccAcl->addRole(new Zend_Acl_Role('guest'))
$ccAcl->add(new Zend_Acl_Resource('library')) $ccAcl->add(new Zend_Acl_Resource('library'))
->add(new Zend_Acl_Resource('index')) ->add(new Zend_Acl_Resource('index'))
->add(new Zend_Acl_Resource('user'))
->add(new Zend_Acl_Resource('error')) ->add(new Zend_Acl_Resource('error'))
->add(new Zend_Acl_Resource('login')) ->add(new Zend_Acl_Resource('login'))
->add(new Zend_Acl_Resource('playlist')) ->add(new Zend_Acl_Resource('playlist'))
@ -27,9 +28,12 @@ $ccAcl->allow('guest', 'index')
->allow('guest', 'api') ->allow('guest', 'api')
->allow('host', 'plupload') ->allow('host', 'plupload')
->allow('host', 'playlist') ->allow('host', 'playlist')
->allow('host', 'schedule'); ->allow('host', 'schedule')
->allow('admin', 'user');
$aclPlugin = new Zend_Controller_Plugin_Acl($ccAcl); $aclPlugin = new Zend_Controller_Plugin_Acl($ccAcl);
Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl($ccAcl);
$front = Zend_Controller_Front::getInstance(); $front = Zend_Controller_Front::getInstance();
$front->registerPlugin($aclPlugin); $front->registerPlugin($aclPlugin);

View file

@ -10,12 +10,18 @@
$pages = array( $pages = array(
array( array(
'label' => 'Home', 'label' => 'Home',
'title' => 'Go Home',
'module' => 'default', 'module' => 'default',
'controller' => 'index', 'controller' => 'index',
'action' => 'index', 'action' => 'index',
'order' => -100 // make sure home is the first page 'order' => -100 // make sure home is the first page
), ),
array(
'label' => 'Add User',
'module' => 'default',
'controller' => 'user',
'action' => 'add-user',
'resource' => 'user'
),
array( array(
'label' => 'Playlists', 'label' => 'Playlists',
'module' => 'default', 'module' => 'default',
@ -62,7 +68,8 @@ $pages = array(
'label' => 'Schedule', 'label' => 'Schedule',
'module' => 'default', 'module' => 'default',
'controller' => 'Schedule', 'controller' => 'Schedule',
'action' => 'index' 'action' => 'index',
'resource' => 'schedule'
), ),
array( array(
'label' => 'Logout', 'label' => 'Logout',

View file

@ -30,25 +30,23 @@ class LoginController extends Zend_Controller_Action
$authAdapter = $this->getAuthAdapter(); $authAdapter = $this->getAuthAdapter();
# get the username and password from the form //get the username and password from the form
$username = $form->getValue('username'); $username = $form->getValue('username');
$password = $form->getValue('password'); $password = $form->getValue('password');
# pass to the adapter the submitted username and password //pass to the adapter the submitted username and password
$authAdapter->setIdentity($username) $authAdapter->setIdentity($username)
->setCredential($password); ->setCredential($password);
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
$result = $auth->authenticate($authAdapter); $result = $auth->authenticate($authAdapter);
# is the user a valid one?
if($result->isValid()) if($result->isValid())
{ {
# all info about this user from the login table //all info about this user from the login table omit only the password
# omit only the password, we don't need that
$userInfo = $authAdapter->getResultRowObject(null, 'password'); $userInfo = $authAdapter->getResultRowObject(null, 'password');
# the default storage is a session with namespace Zend_Auth //the default storage is a session with namespace Zend_Auth
$authStorage = $auth->getStorage(); $authStorage = $auth->getStorage();
$authStorage->write($userInfo); $authStorage->write($userInfo);

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;
}
}

View file

@ -116,7 +116,9 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
else { else {
$this->_roleName = "guest"; $this->_roleName = "guest";
} }
Zend_View_Helper_Navigation_HelperAbstract::setDefaultRole($this->_roleName);
$resourceName = ''; $resourceName = '';
if ($request->getModuleName() != 'default') { if ($request->getModuleName() != 'default') {

View file

@ -0,0 +1,60 @@
<?php
class Application_Form_AddUser extends Zend_Form
{
public function init()
{
// Add login element
$this->addElement('text', 'login', array(
'label' => 'Username:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
));
// Add password element
$this->addElement('text', 'password', array(
'label' => 'Password:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
));
// Add first name element
$this->addElement('text', 'first_name', array(
'label' => 'Firstname:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
));
// Add last name element
$this->addElement('text', 'last_name', array(
'label' => 'Lastname:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
));
//Add type select
$this->addElement('select', 'type', array(
'required' => true,
'multiOptions' => array(
"A" => "admin",
"H" => "host",
"G" => "guest",
),
));
// Add the submit button
$this->addElement('submit', 'submit', array(
'ignore' => true,
'label' => 'Submit',
));
}
}

View file

@ -27,6 +27,18 @@ class User {
return $this->_userRole === 'A'; return $this->_userRole === 'A';
} }
public static function addUser($data) {
$user = new CcSubjs();
$user->setDbLogin($data['login']);
$user->setDbPass(md5($data['password']));
$user->setDbFirstName($data['first_name']);
$user->setDbLastName($data['last_name']);
$user->setDbType($data['type']);
$user->save();
}
public static function getUsers($type=NULL) { public static function getUsers($type=NULL) {
global $CC_DBC; global $CC_DBC;

View file

@ -38,13 +38,14 @@ class CcSubjsTableMap extends TableMap {
$this->setUseIdGenerator(true); $this->setUseIdGenerator(true);
$this->setPrimaryKeyMethodInfo('cc_subjs_id_seq'); $this->setPrimaryKeyMethodInfo('cc_subjs_id_seq');
// columns // columns
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); $this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('LOGIN', 'Login', 'VARCHAR', true, 255, ''); $this->addColumn('LOGIN', 'DbLogin', 'VARCHAR', true, 255, '');
$this->addColumn('PASS', 'Pass', 'VARCHAR', true, 255, ''); $this->addColumn('PASS', 'DbPass', 'VARCHAR', true, 255, '');
$this->addColumn('TYPE', 'Type', 'CHAR', true, 1, 'U'); $this->addColumn('TYPE', 'DbType', 'CHAR', true, 1, 'U');
$this->addColumn('REALNAME', 'Realname', 'VARCHAR', true, 255, ''); $this->addColumn('FIRST_NAME', 'DbFirstName', 'VARCHAR', true, 255, '');
$this->addColumn('LASTLOGIN', 'Lastlogin', 'TIMESTAMP', false, null, null); $this->addColumn('LAST_NAME', 'DbLastName', 'VARCHAR', true, 255, '');
$this->addColumn('LASTFAIL', 'Lastfail', 'TIMESTAMP', false, null, null); $this->addColumn('LASTLOGIN', 'DbLastlogin', 'TIMESTAMP', false, null, null);
$this->addColumn('LASTFAIL', 'DbLastfail', 'TIMESTAMP', false, null, null);
// validators // validators
} // initialize() } // initialize()

View file

@ -393,7 +393,7 @@ abstract class BaseCcAccess extends BaseObject implements Persistent
$this->modifiedColumns[] = CcAccessPeer::OWNER; $this->modifiedColumns[] = CcAccessPeer::OWNER;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -533,7 +533,7 @@ abstract class BaseCcAccess extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->owner !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->owner !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -1137,7 +1137,7 @@ abstract class BaseCcAccess extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setOwner(NULL); $this->setOwner(NULL);
} else { } else {
$this->setOwner($v->getId()); $this->setOwner($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -405,7 +405,7 @@ abstract class BaseCcAccessQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcAccessPeer::OWNER, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcAccessPeer::OWNER, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -1167,7 +1167,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
$this->modifiedColumns[] = CcFilesPeer::EDITEDBY; $this->modifiedColumns[] = CcFilesPeer::EDITEDBY;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -2273,7 +2273,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -3359,7 +3359,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setEditedby(NULL); $this->setEditedby(NULL);
} else { } else {
$this->setEditedby($v->getId()); $this->setEditedby($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -1597,7 +1597,7 @@ abstract class BaseCcFilesQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcFilesPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -160,7 +160,7 @@ abstract class BaseCcPerms extends BaseObject implements Persistent
$this->modifiedColumns[] = CcPermsPeer::SUBJ; $this->modifiedColumns[] = CcPermsPeer::SUBJ;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -295,7 +295,7 @@ abstract class BaseCcPerms extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->subj !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->subj !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -851,7 +851,7 @@ abstract class BaseCcPerms extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setSubj(NULL); $this->setSubj(NULL);
} else { } else {
$this->setSubj($v->getId()); $this->setSubj($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -283,7 +283,7 @@ abstract class BaseCcPermsQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcPermsPeer::SUBJ, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcPermsPeer::SUBJ, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -322,7 +322,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
$this->modifiedColumns[] = CcPlaylistPeer::EDITEDBY; $this->modifiedColumns[] = CcPlaylistPeer::EDITEDBY;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -501,7 +501,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -1127,7 +1127,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setDbEditedby(NULL); $this->setDbEditedby(NULL);
} else { } else {
$this->setDbEditedby($v->getId()); $this->setDbEditedby($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -374,7 +374,7 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcPlaylistPeer::EDITEDBY, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcPlaylistPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -144,7 +144,7 @@ abstract class BaseCcPref extends BaseObject implements Persistent
$this->modifiedColumns[] = CcPrefPeer::SUBJID; $this->modifiedColumns[] = CcPrefPeer::SUBJID;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -258,7 +258,7 @@ abstract class BaseCcPref extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->subjid !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->subjid !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -812,7 +812,7 @@ abstract class BaseCcPref extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setSubjid(NULL); $this->setSubjid(NULL);
} else { } else {
$this->setSubjid($v->getId()); $this->setSubjid($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -248,7 +248,7 @@ abstract class BaseCcPrefQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcPrefPeer::SUBJID, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcPrefPeer::SUBJID, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -167,7 +167,7 @@ abstract class BaseCcSess extends BaseObject implements Persistent
$this->modifiedColumns[] = CcSessPeer::USERID; $this->modifiedColumns[] = CcSessPeer::USERID;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -310,7 +310,7 @@ abstract class BaseCcSess extends BaseObject implements Persistent
public function ensureConsistency() public function ensureConsistency()
{ {
if ($this->aCcSubjs !== null && $this->userid !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->userid !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -856,7 +856,7 @@ abstract class BaseCcSess extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setUserid(NULL); $this->setUserid(NULL);
} else { } else {
$this->setUserid($v->getId()); $this->setUserid($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -262,7 +262,7 @@ abstract class BaseCcSessQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcSessPeer::USERID, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcSessPeer::USERID, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -157,7 +157,7 @@ abstract class BaseCcShowHosts extends BaseObject implements Persistent
$this->modifiedColumns[] = CcShowHostsPeer::SUBJS_ID; $this->modifiedColumns[] = CcShowHostsPeer::SUBJS_ID;
} }
if ($this->aCcSubjs !== null && $this->aCcSubjs->getId() !== $v) { if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
@ -233,7 +233,7 @@ abstract class BaseCcShowHosts extends BaseObject implements Persistent
if ($this->aCcShow !== null && $this->show_id !== $this->aCcShow->getDbId()) { if ($this->aCcShow !== null && $this->show_id !== $this->aCcShow->getDbId()) {
$this->aCcShow = null; $this->aCcShow = null;
} }
if ($this->aCcSubjs !== null && $this->subjs_id !== $this->aCcSubjs->getId()) { if ($this->aCcSubjs !== null && $this->subjs_id !== $this->aCcSubjs->getDbId()) {
$this->aCcSubjs = null; $this->aCcSubjs = null;
} }
} // ensureConsistency } // ensureConsistency
@ -843,7 +843,7 @@ abstract class BaseCcShowHosts extends BaseObject implements Persistent
if ($v === null) { if ($v === null) {
$this->setDbHost(NULL); $this->setDbHost(NULL);
} else { } else {
$this->setDbHost($v->getId()); $this->setDbHost($v->getDbId());
} }
$this->aCcSubjs = $v; $this->aCcSubjs = $v;

View file

@ -299,7 +299,7 @@ abstract class BaseCcShowHostsQuery extends ModelCriteria
public function filterByCcSubjs($ccSubjs, $comparison = null) public function filterByCcSubjs($ccSubjs, $comparison = null)
{ {
return $this return $this
->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $ccSubjs->getId(), $comparison); ->addUsingAlias(CcShowHostsPeer::SUBJS_ID, $ccSubjs->getDbId(), $comparison);
} }
/** /**

View file

@ -52,11 +52,18 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
protected $type; protected $type;
/** /**
* The value for the realname field. * The value for the first_name field.
* Note: this column has a database default value of: '' * Note: this column has a database default value of: ''
* @var string * @var string
*/ */
protected $realname; protected $first_name;
/**
* The value for the last_name field.
* Note: this column has a database default value of: ''
* @var string
*/
protected $last_name;
/** /**
* The value for the lastlogin field. * The value for the lastlogin field.
@ -130,7 +137,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->login = ''; $this->login = '';
$this->pass = ''; $this->pass = '';
$this->type = 'U'; $this->type = 'U';
$this->realname = ''; $this->first_name = '';
$this->last_name = '';
} }
/** /**
@ -148,7 +156,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* *
* @return int * @return int
*/ */
public function getId() public function getDbId()
{ {
return $this->id; return $this->id;
} }
@ -158,7 +166,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* *
* @return string * @return string
*/ */
public function getLogin() public function getDbLogin()
{ {
return $this->login; return $this->login;
} }
@ -168,7 +176,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* *
* @return string * @return string
*/ */
public function getPass() public function getDbPass()
{ {
return $this->pass; return $this->pass;
} }
@ -178,19 +186,29 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* *
* @return string * @return string
*/ */
public function getType() public function getDbType()
{ {
return $this->type; return $this->type;
} }
/** /**
* Get the [realname] column value. * Get the [first_name] column value.
* *
* @return string * @return string
*/ */
public function getRealname() public function getDbFirstName()
{ {
return $this->realname; return $this->first_name;
}
/**
* Get the [last_name] column value.
*
* @return string
*/
public function getDbLastName()
{
return $this->last_name;
} }
/** /**
@ -202,7 +220,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
* @throws PropelException - if unable to parse/validate the date/time value. * @throws PropelException - if unable to parse/validate the date/time value.
*/ */
public function getLastlogin($format = 'Y-m-d H:i:s') public function getDbLastlogin($format = 'Y-m-d H:i:s')
{ {
if ($this->lastlogin === null) { if ($this->lastlogin === null) {
return null; return null;
@ -235,7 +253,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
* @throws PropelException - if unable to parse/validate the date/time value. * @throws PropelException - if unable to parse/validate the date/time value.
*/ */
public function getLastfail($format = 'Y-m-d H:i:s') public function getDbLastfail($format = 'Y-m-d H:i:s')
{ {
if ($this->lastfail === null) { if ($this->lastfail === null) {
return null; return null;
@ -265,7 +283,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @param int $v new value * @param int $v new value
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setId($v) public function setDbId($v)
{ {
if ($v !== null) { if ($v !== null) {
$v = (int) $v; $v = (int) $v;
@ -277,7 +295,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} }
return $this; return $this;
} // setId() } // setDbId()
/** /**
* Set the value of [login] column. * Set the value of [login] column.
@ -285,7 +303,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @param string $v new value * @param string $v new value
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setLogin($v) public function setDbLogin($v)
{ {
if ($v !== null) { if ($v !== null) {
$v = (string) $v; $v = (string) $v;
@ -297,7 +315,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} }
return $this; return $this;
} // setLogin() } // setDbLogin()
/** /**
* Set the value of [pass] column. * Set the value of [pass] column.
@ -305,7 +323,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @param string $v new value * @param string $v new value
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setPass($v) public function setDbPass($v)
{ {
if ($v !== null) { if ($v !== null) {
$v = (string) $v; $v = (string) $v;
@ -317,7 +335,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} }
return $this; return $this;
} // setPass() } // setDbPass()
/** /**
* Set the value of [type] column. * Set the value of [type] column.
@ -325,7 +343,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* @param string $v new value * @param string $v new value
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setType($v) public function setDbType($v)
{ {
if ($v !== null) { if ($v !== null) {
$v = (string) $v; $v = (string) $v;
@ -337,27 +355,47 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} }
return $this; return $this;
} // setType() } // setDbType()
/** /**
* Set the value of [realname] column. * Set the value of [first_name] column.
* *
* @param string $v new value * @param string $v new value
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setRealname($v) public function setDbFirstName($v)
{ {
if ($v !== null) { if ($v !== null) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->realname !== $v || $this->isNew()) { if ($this->first_name !== $v || $this->isNew()) {
$this->realname = $v; $this->first_name = $v;
$this->modifiedColumns[] = CcSubjsPeer::REALNAME; $this->modifiedColumns[] = CcSubjsPeer::FIRST_NAME;
} }
return $this; return $this;
} // setRealname() } // setDbFirstName()
/**
* Set the value of [last_name] column.
*
* @param string $v new value
* @return CcSubjs The current object (for fluent API support)
*/
public function setDbLastName($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->last_name !== $v || $this->isNew()) {
$this->last_name = $v;
$this->modifiedColumns[] = CcSubjsPeer::LAST_NAME;
}
return $this;
} // setDbLastName()
/** /**
* Sets the value of [lastlogin] column to a normalized version of the date/time value specified. * Sets the value of [lastlogin] column to a normalized version of the date/time value specified.
@ -366,7 +404,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* be treated as NULL for temporal objects. * be treated as NULL for temporal objects.
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setLastlogin($v) public function setDbLastlogin($v)
{ {
// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
// -- which is unexpected, to say the least. // -- which is unexpected, to say the least.
@ -406,7 +444,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} // if either are not null } // if either are not null
return $this; return $this;
} // setLastlogin() } // setDbLastlogin()
/** /**
* Sets the value of [lastfail] column to a normalized version of the date/time value specified. * Sets the value of [lastfail] column to a normalized version of the date/time value specified.
@ -415,7 +453,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
* be treated as NULL for temporal objects. * be treated as NULL for temporal objects.
* @return CcSubjs The current object (for fluent API support) * @return CcSubjs The current object (for fluent API support)
*/ */
public function setLastfail($v) public function setDbLastfail($v)
{ {
// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now') // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
// -- which is unexpected, to say the least. // -- which is unexpected, to say the least.
@ -455,7 +493,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
} // if either are not null } // if either are not null
return $this; return $this;
} // setLastfail() } // setDbLastfail()
/** /**
* Indicates whether the columns in this object are only set to default values. * Indicates whether the columns in this object are only set to default values.
@ -479,7 +517,11 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return false; return false;
} }
if ($this->realname !== '') { if ($this->first_name !== '') {
return false;
}
if ($this->last_name !== '') {
return false; return false;
} }
@ -509,9 +551,10 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->login = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null; $this->login = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->pass = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null; $this->pass = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->type = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null; $this->type = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->realname = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null; $this->first_name = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->lastlogin = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null; $this->last_name = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
$this->lastfail = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null; $this->lastlogin = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
$this->lastfail = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -520,7 +563,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 7; // 7 = CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 8; // 8 = CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating CcSubjs object", $e); throw new PropelException("Error populating CcSubjs object", $e);
@ -720,7 +763,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$pk = BasePeer::doInsert($criteria, $con); $pk = BasePeer::doInsert($criteria, $con);
$affectedRows = 1; $affectedRows = 1;
$this->setId($pk); //[IMV] update autoincrement primary key $this->setDbId($pk); //[IMV] update autoincrement primary key
$this->setNew(false); $this->setNew(false);
} else { } else {
$affectedRows = CcSubjsPeer::doUpdate($this, $con); $affectedRows = CcSubjsPeer::doUpdate($this, $con);
@ -946,25 +989,28 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
{ {
switch($pos) { switch($pos) {
case 0: case 0:
return $this->getId(); return $this->getDbId();
break; break;
case 1: case 1:
return $this->getLogin(); return $this->getDbLogin();
break; break;
case 2: case 2:
return $this->getPass(); return $this->getDbPass();
break; break;
case 3: case 3:
return $this->getType(); return $this->getDbType();
break; break;
case 4: case 4:
return $this->getRealname(); return $this->getDbFirstName();
break; break;
case 5: case 5:
return $this->getLastlogin(); return $this->getDbLastName();
break; break;
case 6: case 6:
return $this->getLastfail(); return $this->getDbLastlogin();
break;
case 7:
return $this->getDbLastfail();
break; break;
default: default:
return null; return null;
@ -989,13 +1035,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
{ {
$keys = CcSubjsPeer::getFieldNames($keyType); $keys = CcSubjsPeer::getFieldNames($keyType);
$result = array( $result = array(
$keys[0] => $this->getId(), $keys[0] => $this->getDbId(),
$keys[1] => $this->getLogin(), $keys[1] => $this->getDbLogin(),
$keys[2] => $this->getPass(), $keys[2] => $this->getDbPass(),
$keys[3] => $this->getType(), $keys[3] => $this->getDbType(),
$keys[4] => $this->getRealname(), $keys[4] => $this->getDbFirstName(),
$keys[5] => $this->getLastlogin(), $keys[5] => $this->getDbLastName(),
$keys[6] => $this->getLastfail(), $keys[6] => $this->getDbLastlogin(),
$keys[7] => $this->getDbLastfail(),
); );
return $result; return $result;
} }
@ -1028,25 +1075,28 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
{ {
switch($pos) { switch($pos) {
case 0: case 0:
$this->setId($value); $this->setDbId($value);
break; break;
case 1: case 1:
$this->setLogin($value); $this->setDbLogin($value);
break; break;
case 2: case 2:
$this->setPass($value); $this->setDbPass($value);
break; break;
case 3: case 3:
$this->setType($value); $this->setDbType($value);
break; break;
case 4: case 4:
$this->setRealname($value); $this->setDbFirstName($value);
break; break;
case 5: case 5:
$this->setLastlogin($value); $this->setDbLastName($value);
break; break;
case 6: case 6:
$this->setLastfail($value); $this->setDbLastlogin($value);
break;
case 7:
$this->setDbLastfail($value);
break; break;
} // switch() } // switch()
} }
@ -1072,13 +1122,14 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
{ {
$keys = CcSubjsPeer::getFieldNames($keyType); $keys = CcSubjsPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setLogin($arr[$keys[1]]); if (array_key_exists($keys[1], $arr)) $this->setDbLogin($arr[$keys[1]]);
if (array_key_exists($keys[2], $arr)) $this->setPass($arr[$keys[2]]); if (array_key_exists($keys[2], $arr)) $this->setDbPass($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setType($arr[$keys[3]]); if (array_key_exists($keys[3], $arr)) $this->setDbType($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setRealname($arr[$keys[4]]); if (array_key_exists($keys[4], $arr)) $this->setDbFirstName($arr[$keys[4]]);
if (array_key_exists($keys[5], $arr)) $this->setLastlogin($arr[$keys[5]]); if (array_key_exists($keys[5], $arr)) $this->setDbLastName($arr[$keys[5]]);
if (array_key_exists($keys[6], $arr)) $this->setLastfail($arr[$keys[6]]); if (array_key_exists($keys[6], $arr)) $this->setDbLastlogin($arr[$keys[6]]);
if (array_key_exists($keys[7], $arr)) $this->setDbLastfail($arr[$keys[7]]);
} }
/** /**
@ -1094,7 +1145,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if ($this->isColumnModified(CcSubjsPeer::LOGIN)) $criteria->add(CcSubjsPeer::LOGIN, $this->login); if ($this->isColumnModified(CcSubjsPeer::LOGIN)) $criteria->add(CcSubjsPeer::LOGIN, $this->login);
if ($this->isColumnModified(CcSubjsPeer::PASS)) $criteria->add(CcSubjsPeer::PASS, $this->pass); if ($this->isColumnModified(CcSubjsPeer::PASS)) $criteria->add(CcSubjsPeer::PASS, $this->pass);
if ($this->isColumnModified(CcSubjsPeer::TYPE)) $criteria->add(CcSubjsPeer::TYPE, $this->type); if ($this->isColumnModified(CcSubjsPeer::TYPE)) $criteria->add(CcSubjsPeer::TYPE, $this->type);
if ($this->isColumnModified(CcSubjsPeer::REALNAME)) $criteria->add(CcSubjsPeer::REALNAME, $this->realname); if ($this->isColumnModified(CcSubjsPeer::FIRST_NAME)) $criteria->add(CcSubjsPeer::FIRST_NAME, $this->first_name);
if ($this->isColumnModified(CcSubjsPeer::LAST_NAME)) $criteria->add(CcSubjsPeer::LAST_NAME, $this->last_name);
if ($this->isColumnModified(CcSubjsPeer::LASTLOGIN)) $criteria->add(CcSubjsPeer::LASTLOGIN, $this->lastlogin); if ($this->isColumnModified(CcSubjsPeer::LASTLOGIN)) $criteria->add(CcSubjsPeer::LASTLOGIN, $this->lastlogin);
if ($this->isColumnModified(CcSubjsPeer::LASTFAIL)) $criteria->add(CcSubjsPeer::LASTFAIL, $this->lastfail); if ($this->isColumnModified(CcSubjsPeer::LASTFAIL)) $criteria->add(CcSubjsPeer::LASTFAIL, $this->lastfail);
@ -1123,7 +1175,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/ */
public function getPrimaryKey() public function getPrimaryKey()
{ {
return $this->getId(); return $this->getDbId();
} }
/** /**
@ -1134,7 +1186,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/ */
public function setPrimaryKey($key) public function setPrimaryKey($key)
{ {
$this->setId($key); $this->setDbId($key);
} }
/** /**
@ -1143,7 +1195,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/ */
public function isPrimaryKeyNull() public function isPrimaryKeyNull()
{ {
return null === $this->getId(); return null === $this->getDbId();
} }
/** /**
@ -1158,12 +1210,13 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/ */
public function copyInto($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setLogin($this->login); $copyObj->setDbLogin($this->login);
$copyObj->setPass($this->pass); $copyObj->setDbPass($this->pass);
$copyObj->setType($this->type); $copyObj->setDbType($this->type);
$copyObj->setRealname($this->realname); $copyObj->setDbFirstName($this->first_name);
$copyObj->setLastlogin($this->lastlogin); $copyObj->setDbLastName($this->last_name);
$copyObj->setLastfail($this->lastfail); $copyObj->setDbLastlogin($this->lastlogin);
$copyObj->setDbLastfail($this->lastfail);
if ($deepCopy) { if ($deepCopy) {
// important: temporarily setNew(false) because this affects the behavior of // important: temporarily setNew(false) because this affects the behavior of
@ -1216,7 +1269,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setId(NULL); // this is a auto-increment column, so set to default value $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
} }
/** /**
@ -2054,7 +2107,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->login = null; $this->login = null;
$this->pass = null; $this->pass = null;
$this->type = null; $this->type = null;
$this->realname = null; $this->first_name = null;
$this->last_name = null;
$this->lastlogin = null; $this->lastlogin = null;
$this->lastfail = null; $this->lastfail = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;

View file

@ -26,7 +26,7 @@ abstract class BaseCcSubjsPeer {
const TM_CLASS = 'CcSubjsTableMap'; const TM_CLASS = 'CcSubjsTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 7; const NUM_COLUMNS = 8;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@ -43,8 +43,11 @@ abstract class BaseCcSubjsPeer {
/** the column name for the TYPE field */ /** the column name for the TYPE field */
const TYPE = 'cc_subjs.TYPE'; const TYPE = 'cc_subjs.TYPE';
/** the column name for the REALNAME field */ /** the column name for the FIRST_NAME field */
const REALNAME = 'cc_subjs.REALNAME'; const FIRST_NAME = 'cc_subjs.FIRST_NAME';
/** the column name for the LAST_NAME field */
const LAST_NAME = 'cc_subjs.LAST_NAME';
/** the column name for the LASTLOGIN field */ /** the column name for the LASTLOGIN field */
const LASTLOGIN = 'cc_subjs.LASTLOGIN'; const LASTLOGIN = 'cc_subjs.LASTLOGIN';
@ -68,12 +71,12 @@ abstract class BaseCcSubjsPeer {
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', 'Login', 'Pass', 'Type', 'Realname', 'Lastlogin', 'Lastfail', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbLogin', 'DbPass', 'DbType', 'DbFirstName', 'DbLastName', 'DbLastlogin', 'DbLastfail', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id', 'login', 'pass', 'type', 'realname', 'lastlogin', 'lastfail', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbLogin', 'dbPass', 'dbType', 'dbFirstName', 'dbLastName', 'dbLastlogin', 'dbLastfail', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::REALNAME, self::LASTLOGIN, self::LASTFAIL, ), BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::FIRST_NAME, self::LAST_NAME, self::LASTLOGIN, self::LASTFAIL, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'REALNAME', 'LASTLOGIN', 'LASTFAIL', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'FIRST_NAME', 'LAST_NAME', 'LASTLOGIN', 'LASTFAIL', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'realname', 'lastlogin', 'lastfail', ), BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'first_name', 'last_name', 'lastlogin', 'lastfail', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@ -83,12 +86,12 @@ abstract class BaseCcSubjsPeer {
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Login' => 1, 'Pass' => 2, 'Type' => 3, 'Realname' => 4, 'Lastlogin' => 5, 'Lastfail' => 6, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbLogin' => 1, 'DbPass' => 2, 'DbType' => 3, 'DbFirstName' => 4, 'DbLastName' => 5, 'DbLastlogin' => 6, 'DbLastfail' => 7, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'realname' => 4, 'lastlogin' => 5, 'lastfail' => 6, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbLogin' => 1, 'dbPass' => 2, 'dbType' => 3, 'dbFirstName' => 4, 'dbLastName' => 5, 'dbLastlogin' => 6, 'dbLastfail' => 7, ),
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::LOGIN => 1, self::PASS => 2, self::TYPE => 3, self::REALNAME => 4, self::LASTLOGIN => 5, self::LASTFAIL => 6, ), BasePeer::TYPE_COLNAME => array (self::ID => 0, self::LOGIN => 1, self::PASS => 2, self::TYPE => 3, self::FIRST_NAME => 4, self::LAST_NAME => 5, self::LASTLOGIN => 6, self::LASTFAIL => 7, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'REALNAME' => 4, 'LASTLOGIN' => 5, 'LASTFAIL' => 6, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'FIRST_NAME' => 4, 'LAST_NAME' => 5, 'LASTLOGIN' => 6, 'LASTFAIL' => 7, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'realname' => 4, 'lastlogin' => 5, 'lastfail' => 6, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'first_name' => 4, 'last_name' => 5, 'lastlogin' => 6, 'lastfail' => 7, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
); );
/** /**
@ -164,7 +167,8 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn(CcSubjsPeer::LOGIN); $criteria->addSelectColumn(CcSubjsPeer::LOGIN);
$criteria->addSelectColumn(CcSubjsPeer::PASS); $criteria->addSelectColumn(CcSubjsPeer::PASS);
$criteria->addSelectColumn(CcSubjsPeer::TYPE); $criteria->addSelectColumn(CcSubjsPeer::TYPE);
$criteria->addSelectColumn(CcSubjsPeer::REALNAME); $criteria->addSelectColumn(CcSubjsPeer::FIRST_NAME);
$criteria->addSelectColumn(CcSubjsPeer::LAST_NAME);
$criteria->addSelectColumn(CcSubjsPeer::LASTLOGIN); $criteria->addSelectColumn(CcSubjsPeer::LASTLOGIN);
$criteria->addSelectColumn(CcSubjsPeer::LASTFAIL); $criteria->addSelectColumn(CcSubjsPeer::LASTFAIL);
} else { } else {
@ -172,7 +176,8 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn($alias . '.LOGIN'); $criteria->addSelectColumn($alias . '.LOGIN');
$criteria->addSelectColumn($alias . '.PASS'); $criteria->addSelectColumn($alias . '.PASS');
$criteria->addSelectColumn($alias . '.TYPE'); $criteria->addSelectColumn($alias . '.TYPE');
$criteria->addSelectColumn($alias . '.REALNAME'); $criteria->addSelectColumn($alias . '.FIRST_NAME');
$criteria->addSelectColumn($alias . '.LAST_NAME');
$criteria->addSelectColumn($alias . '.LASTLOGIN'); $criteria->addSelectColumn($alias . '.LASTLOGIN');
$criteria->addSelectColumn($alias . '.LASTFAIL'); $criteria->addSelectColumn($alias . '.LASTFAIL');
} }
@ -299,7 +304,7 @@ abstract class BaseCcSubjsPeer {
{ {
if (Propel::isInstancePoolingEnabled()) { if (Propel::isInstancePoolingEnabled()) {
if ($key === null) { if ($key === null) {
$key = (string) $obj->getId(); $key = (string) $obj->getDbId();
} // if key === null } // if key === null
self::$instances[$key] = $obj; self::$instances[$key] = $obj;
} }
@ -319,7 +324,7 @@ abstract class BaseCcSubjsPeer {
{ {
if (Propel::isInstancePoolingEnabled() && $value !== null) { if (Propel::isInstancePoolingEnabled() && $value !== null) {
if (is_object($value) && $value instanceof CcSubjs) { if (is_object($value) && $value instanceof CcSubjs) {
$key = (string) $value->getId(); $key = (string) $value->getDbId();
} elseif (is_scalar($value)) { } elseif (is_scalar($value)) {
// assume we've been passed a primary key // assume we've been passed a primary key
$key = (string) $value; $key = (string) $value;

View file

@ -6,21 +6,23 @@
* *
* *
* *
* @method CcSubjsQuery orderById($order = Criteria::ASC) Order by the id column * @method CcSubjsQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcSubjsQuery orderByLogin($order = Criteria::ASC) Order by the login column * @method CcSubjsQuery orderByDbLogin($order = Criteria::ASC) Order by the login column
* @method CcSubjsQuery orderByPass($order = Criteria::ASC) Order by the pass column * @method CcSubjsQuery orderByDbPass($order = Criteria::ASC) Order by the pass column
* @method CcSubjsQuery orderByType($order = Criteria::ASC) Order by the type column * @method CcSubjsQuery orderByDbType($order = Criteria::ASC) Order by the type column
* @method CcSubjsQuery orderByRealname($order = Criteria::ASC) Order by the realname column * @method CcSubjsQuery orderByDbFirstName($order = Criteria::ASC) Order by the first_name column
* @method CcSubjsQuery orderByLastlogin($order = Criteria::ASC) Order by the lastlogin column * @method CcSubjsQuery orderByDbLastName($order = Criteria::ASC) Order by the last_name column
* @method CcSubjsQuery orderByLastfail($order = Criteria::ASC) Order by the lastfail column * @method CcSubjsQuery orderByDbLastlogin($order = Criteria::ASC) Order by the lastlogin column
* @method CcSubjsQuery orderByDbLastfail($order = Criteria::ASC) Order by the lastfail column
* *
* @method CcSubjsQuery groupById() Group by the id column * @method CcSubjsQuery groupByDbId() Group by the id column
* @method CcSubjsQuery groupByLogin() Group by the login column * @method CcSubjsQuery groupByDbLogin() Group by the login column
* @method CcSubjsQuery groupByPass() Group by the pass column * @method CcSubjsQuery groupByDbPass() Group by the pass column
* @method CcSubjsQuery groupByType() Group by the type column * @method CcSubjsQuery groupByDbType() Group by the type column
* @method CcSubjsQuery groupByRealname() Group by the realname column * @method CcSubjsQuery groupByDbFirstName() Group by the first_name column
* @method CcSubjsQuery groupByLastlogin() Group by the lastlogin column * @method CcSubjsQuery groupByDbLastName() Group by the last_name column
* @method CcSubjsQuery groupByLastfail() Group by the lastfail column * @method CcSubjsQuery groupByDbLastlogin() Group by the lastlogin column
* @method CcSubjsQuery groupByDbLastfail() Group by the lastfail column
* *
* @method CcSubjsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query * @method CcSubjsQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query * @method CcSubjsQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
@ -57,21 +59,23 @@
* @method CcSubjs findOne(PropelPDO $con = null) Return the first CcSubjs matching the query * @method CcSubjs findOne(PropelPDO $con = null) Return the first CcSubjs matching the query
* @method CcSubjs findOneOrCreate(PropelPDO $con = null) Return the first CcSubjs matching the query, or a new CcSubjs object populated from the query conditions when no match is found * @method CcSubjs findOneOrCreate(PropelPDO $con = null) Return the first CcSubjs matching the query, or a new CcSubjs object populated from the query conditions when no match is found
* *
* @method CcSubjs findOneById(int $id) Return the first CcSubjs filtered by the id column * @method CcSubjs findOneByDbId(int $id) Return the first CcSubjs filtered by the id column
* @method CcSubjs findOneByLogin(string $login) Return the first CcSubjs filtered by the login column * @method CcSubjs findOneByDbLogin(string $login) Return the first CcSubjs filtered by the login column
* @method CcSubjs findOneByPass(string $pass) Return the first CcSubjs filtered by the pass column * @method CcSubjs findOneByDbPass(string $pass) Return the first CcSubjs filtered by the pass column
* @method CcSubjs findOneByType(string $type) Return the first CcSubjs filtered by the type column * @method CcSubjs findOneByDbType(string $type) Return the first CcSubjs filtered by the type column
* @method CcSubjs findOneByRealname(string $realname) Return the first CcSubjs filtered by the realname column * @method CcSubjs findOneByDbFirstName(string $first_name) Return the first CcSubjs filtered by the first_name column
* @method CcSubjs findOneByLastlogin(string $lastlogin) Return the first CcSubjs filtered by the lastlogin column * @method CcSubjs findOneByDbLastName(string $last_name) Return the first CcSubjs filtered by the last_name column
* @method CcSubjs findOneByLastfail(string $lastfail) Return the first CcSubjs filtered by the lastfail column * @method CcSubjs findOneByDbLastlogin(string $lastlogin) Return the first CcSubjs filtered by the lastlogin column
* @method CcSubjs findOneByDbLastfail(string $lastfail) Return the first CcSubjs filtered by the lastfail column
* *
* @method array findById(int $id) Return CcSubjs objects filtered by the id column * @method array findByDbId(int $id) Return CcSubjs objects filtered by the id column
* @method array findByLogin(string $login) Return CcSubjs objects filtered by the login column * @method array findByDbLogin(string $login) Return CcSubjs objects filtered by the login column
* @method array findByPass(string $pass) Return CcSubjs objects filtered by the pass column * @method array findByDbPass(string $pass) Return CcSubjs objects filtered by the pass column
* @method array findByType(string $type) Return CcSubjs objects filtered by the type column * @method array findByDbType(string $type) Return CcSubjs objects filtered by the type column
* @method array findByRealname(string $realname) Return CcSubjs objects filtered by the realname column * @method array findByDbFirstName(string $first_name) Return CcSubjs objects filtered by the first_name column
* @method array findByLastlogin(string $lastlogin) Return CcSubjs objects filtered by the lastlogin column * @method array findByDbLastName(string $last_name) Return CcSubjs objects filtered by the last_name column
* @method array findByLastfail(string $lastfail) Return CcSubjs objects filtered by the lastfail column * @method array findByDbLastlogin(string $lastlogin) Return CcSubjs objects filtered by the lastlogin column
* @method array findByDbLastfail(string $lastfail) Return CcSubjs objects filtered by the lastfail column
* *
* @package propel.generator.campcaster.om * @package propel.generator.campcaster.om
*/ */
@ -184,127 +188,149 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
/** /**
* Filter the query on the id column * Filter the query on the id column
* *
* @param int|array $id The value to use as filter. * @param int|array $dbId The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue) * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterById($id = null, $comparison = null) public function filterByDbId($dbId = null, $comparison = null)
{ {
if (is_array($id) && null === $comparison) { if (is_array($dbId) && null === $comparison) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} }
return $this->addUsingAlias(CcSubjsPeer::ID, $id, $comparison); return $this->addUsingAlias(CcSubjsPeer::ID, $dbId, $comparison);
} }
/** /**
* Filter the query on the login column * Filter the query on the login column
* *
* @param string $login The value to use as filter. * @param string $dbLogin The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE) * Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByLogin($login = null, $comparison = null) public function filterByDbLogin($dbLogin = null, $comparison = null)
{ {
if (null === $comparison) { if (null === $comparison) {
if (is_array($login)) { if (is_array($dbLogin)) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $login)) { } elseif (preg_match('/[\%\*]/', $dbLogin)) {
$login = str_replace('*', '%', $login); $dbLogin = str_replace('*', '%', $dbLogin);
$comparison = Criteria::LIKE; $comparison = Criteria::LIKE;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::LOGIN, $login, $comparison); return $this->addUsingAlias(CcSubjsPeer::LOGIN, $dbLogin, $comparison);
} }
/** /**
* Filter the query on the pass column * Filter the query on the pass column
* *
* @param string $pass The value to use as filter. * @param string $dbPass The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE) * Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByPass($pass = null, $comparison = null) public function filterByDbPass($dbPass = null, $comparison = null)
{ {
if (null === $comparison) { if (null === $comparison) {
if (is_array($pass)) { if (is_array($dbPass)) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $pass)) { } elseif (preg_match('/[\%\*]/', $dbPass)) {
$pass = str_replace('*', '%', $pass); $dbPass = str_replace('*', '%', $dbPass);
$comparison = Criteria::LIKE; $comparison = Criteria::LIKE;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::PASS, $pass, $comparison); return $this->addUsingAlias(CcSubjsPeer::PASS, $dbPass, $comparison);
} }
/** /**
* Filter the query on the type column * Filter the query on the type column
* *
* @param string $type The value to use as filter. * @param string $dbType The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE) * Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByType($type = null, $comparison = null) public function filterByDbType($dbType = null, $comparison = null)
{ {
if (null === $comparison) { if (null === $comparison) {
if (is_array($type)) { if (is_array($dbType)) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $type)) { } elseif (preg_match('/[\%\*]/', $dbType)) {
$type = str_replace('*', '%', $type); $dbType = str_replace('*', '%', $dbType);
$comparison = Criteria::LIKE; $comparison = Criteria::LIKE;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::TYPE, $type, $comparison); return $this->addUsingAlias(CcSubjsPeer::TYPE, $dbType, $comparison);
} }
/** /**
* Filter the query on the realname column * Filter the query on the first_name column
* *
* @param string $realname The value to use as filter. * @param string $dbFirstName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE) * Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByRealname($realname = null, $comparison = null) public function filterByDbFirstName($dbFirstName = null, $comparison = null)
{ {
if (null === $comparison) { if (null === $comparison) {
if (is_array($realname)) { if (is_array($dbFirstName)) {
$comparison = Criteria::IN; $comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $realname)) { } elseif (preg_match('/[\%\*]/', $dbFirstName)) {
$realname = str_replace('*', '%', $realname); $dbFirstName = str_replace('*', '%', $dbFirstName);
$comparison = Criteria::LIKE; $comparison = Criteria::LIKE;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::REALNAME, $realname, $comparison); return $this->addUsingAlias(CcSubjsPeer::FIRST_NAME, $dbFirstName, $comparison);
}
/**
* Filter the query on the last_name column
*
* @param string $dbLastName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcSubjsQuery The current query, for fluid interface
*/
public function filterByDbLastName($dbLastName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLastName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLastName)) {
$dbLastName = str_replace('*', '%', $dbLastName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsPeer::LAST_NAME, $dbLastName, $comparison);
} }
/** /**
* Filter the query on the lastlogin column * Filter the query on the lastlogin column
* *
* @param string|array $lastlogin The value to use as filter. * @param string|array $dbLastlogin The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue) * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByLastlogin($lastlogin = null, $comparison = null) public function filterByDbLastlogin($dbLastlogin = null, $comparison = null)
{ {
if (is_array($lastlogin)) { if (is_array($dbLastlogin)) {
$useMinMax = false; $useMinMax = false;
if (isset($lastlogin['min'])) { if (isset($dbLastlogin['min'])) {
$this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $lastlogin['min'], Criteria::GREATER_EQUAL); $this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $dbLastlogin['min'], Criteria::GREATER_EQUAL);
$useMinMax = true; $useMinMax = true;
} }
if (isset($lastlogin['max'])) { if (isset($dbLastlogin['max'])) {
$this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $lastlogin['max'], Criteria::LESS_EQUAL); $this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $dbLastlogin['max'], Criteria::LESS_EQUAL);
$useMinMax = true; $useMinMax = true;
} }
if ($useMinMax) { if ($useMinMax) {
@ -314,28 +340,28 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
$comparison = Criteria::IN; $comparison = Criteria::IN;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $lastlogin, $comparison); return $this->addUsingAlias(CcSubjsPeer::LASTLOGIN, $dbLastlogin, $comparison);
} }
/** /**
* Filter the query on the lastfail column * Filter the query on the lastfail column
* *
* @param string|array $lastfail The value to use as filter. * @param string|array $dbLastfail The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue) * Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
* *
* @return CcSubjsQuery The current query, for fluid interface * @return CcSubjsQuery The current query, for fluid interface
*/ */
public function filterByLastfail($lastfail = null, $comparison = null) public function filterByDbLastfail($dbLastfail = null, $comparison = null)
{ {
if (is_array($lastfail)) { if (is_array($dbLastfail)) {
$useMinMax = false; $useMinMax = false;
if (isset($lastfail['min'])) { if (isset($dbLastfail['min'])) {
$this->addUsingAlias(CcSubjsPeer::LASTFAIL, $lastfail['min'], Criteria::GREATER_EQUAL); $this->addUsingAlias(CcSubjsPeer::LASTFAIL, $dbLastfail['min'], Criteria::GREATER_EQUAL);
$useMinMax = true; $useMinMax = true;
} }
if (isset($lastfail['max'])) { if (isset($dbLastfail['max'])) {
$this->addUsingAlias(CcSubjsPeer::LASTFAIL, $lastfail['max'], Criteria::LESS_EQUAL); $this->addUsingAlias(CcSubjsPeer::LASTFAIL, $dbLastfail['max'], Criteria::LESS_EQUAL);
$useMinMax = true; $useMinMax = true;
} }
if ($useMinMax) { if ($useMinMax) {
@ -345,7 +371,7 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
$comparison = Criteria::IN; $comparison = Criteria::IN;
} }
} }
return $this->addUsingAlias(CcSubjsPeer::LASTFAIL, $lastfail, $comparison); return $this->addUsingAlias(CcSubjsPeer::LASTFAIL, $dbLastfail, $comparison);
} }
/** /**
@ -806,7 +832,7 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
public function prune($ccSubjs = null) public function prune($ccSubjs = null)
{ {
if ($ccSubjs) { if ($ccSubjs) {
$this->addUsingAlias(CcSubjsPeer::ID, $ccSubjs->getId(), Criteria::NOT_EQUAL); $this->addUsingAlias(CcSubjsPeer::ID, $ccSubjs->getDbId(), Criteria::NOT_EQUAL);
} }
return $this; return $this;

View file

@ -0,0 +1,3 @@
<?php
echo $this->form;

View file

@ -0,0 +1 @@
<br /><br /><center>View script for controller <b>User</b> and script/action name <b>index</b></center>

View file

@ -248,13 +248,14 @@
</unique> </unique>
</table> </table>
<table name="cc_subjs" phpName="CcSubjs"> <table name="cc_subjs" phpName="CcSubjs">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/> <column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="login" phpName="Login" type="VARCHAR" size="255" required="true" defaultValue=""/> <column name="login" phpName="DbLogin" type="VARCHAR" size="255" required="true" defaultValue=""/>
<column name="pass" phpName="Pass" type="VARCHAR" size="255" required="true" defaultValue=""/> <column name="pass" phpName="DbPass" type="VARCHAR" size="255" required="true" defaultValue=""/>
<column name="type" phpName="Type" type="CHAR" size="1" required="true" defaultValue="U"/> <column name="type" phpName="DbType" type="CHAR" size="1" required="true" defaultValue="U"/>
<column name="realname" phpName="Realname" type="VARCHAR" size="255" required="true" defaultValue=""/> <column name="first_name" phpName="DbFirstName" type="VARCHAR" size="255" required="true" defaultValue=""/>
<column name="lastlogin" phpName="Lastlogin" type="TIMESTAMP" required="false"/> <column name="last_name" phpName="DbLastName" type="VARCHAR" size="255" required="true" defaultValue=""/>
<column name="lastfail" phpName="Lastfail" type="TIMESTAMP" required="false"/> <column name="lastlogin" phpName="DbLastlogin" type="TIMESTAMP" required="false"/>
<column name="lastfail" phpName="DbLastfail" type="TIMESTAMP" required="false"/>
<unique name="cc_subjs_id_idx"> <unique name="cc_subjs_id_idx">
<unique-column name="id"/> <unique-column name="id"/>
</unique> </unique>

View file

@ -393,7 +393,8 @@ CREATE TABLE "cc_subjs"
"login" VARCHAR(255) default '' NOT NULL, "login" VARCHAR(255) default '' NOT NULL,
"pass" VARCHAR(255) default '' NOT NULL, "pass" VARCHAR(255) default '' NOT NULL,
"type" CHAR(1) default 'U' NOT NULL, "type" CHAR(1) default 'U' NOT NULL,
"realname" VARCHAR(255) default '' NOT NULL, "first_name" VARCHAR(255) default '' NOT NULL,
"last_name" VARCHAR(255) default '' NOT NULL,
"lastlogin" TIMESTAMP, "lastlogin" TIMESTAMP,
"lastfail" TIMESTAMP, "lastfail" TIMESTAMP,
PRIMARY KEY ("id"), PRIMARY KEY ("id"),