CC-3921: Add mobile phone number field to user record

-done
This commit is contained in:
denise 2012-06-13 13:39:54 -04:00
parent 3f0a06ee2b
commit 9cabd4d32c
10 changed files with 119 additions and 19 deletions

View File

@ -50,6 +50,7 @@ class UserController extends Zend_Controller_Action
$user->setPassword($formdata['password']); $user->setPassword($formdata['password']);
$user->setType($formdata['type']); $user->setType($formdata['type']);
$user->setEmail($formdata['email']); $user->setEmail($formdata['email']);
$user->setCellPhone($formdata['cell_phone']);
$user->setSkype($formdata['skype']); $user->setSkype($formdata['skype']);
$user->setJabber($formdata['jabber']); $user->setJabber($formdata['jabber']);
$user->save(); $user->save();

View File

@ -52,6 +52,12 @@ class Application_Form_AddUser extends Zend_Form
$email->addValidator('EmailAddress'); $email->addValidator('EmailAddress');
$this->addElement($email); $this->addElement($email);
$cellPhone = new Zend_Form_Element_Text('cell_phone');
$cellPhone->setLabel('Mobile Phone:');
$cellPhone->setAttrib('class', 'input_text');
$cellPhone->addFilter('StringTrim');
$this->addElement($cellPhone);
$skype = new Zend_Form_Element_Text('skype'); $skype = new Zend_Form_Element_Text('skype');
$skype->setLabel('Skype:'); $skype->setLabel('Skype:');
$skype->setAttrib('class', 'input_text'); $skype->setAttrib('class', 'input_text');
@ -91,7 +97,7 @@ class Application_Form_AddUser extends Zend_Form
$count = CcSubjsQuery::create()->filterByDbLogin($data['login'])->count(); $count = CcSubjsQuery::create()->filterByDbLogin($data['login'])->count();
if ($count != 0){ if ($count != 0){
$this->getElement('login')->setErrors(array("login name is not unique.")); $this->getElement('login')->setErrors(array("Login name is not unique."));
return false; return false;
} }
} }

View File

@ -120,6 +120,11 @@ class Application_Model_User {
$user->setDbEmail($email); $user->setDbEmail($email);
} }
public function setCellPhone($cellPhone){
$user = $this->_userInstance;
$user->setDbCellPhone($cellPhone);
}
public function setSkype($skype){ public function setSkype($skype){
$user = $this->_userInstance; $user = $this->_userInstance;
$user->setDbSkypeContact($skype); $user->setDbSkypeContact($skype);
@ -160,6 +165,11 @@ class Application_Model_User {
return $user->getDbEmail(); return $user->getDbEmail();
} }
public function getCellPhone(){
$user = $this->_userInstance;
return $user->getDbCellPhone();
}
public function getSkype(){ public function getSkype(){
$user = $this->_userInstance; $user = $this->_userInstance;
return $user->getDbSkypeContact(); return $user->getDbSkypeContact();
@ -277,7 +287,7 @@ class Application_Model_User {
public static function getUserData($id){ public static function getUserData($id){
$con = Propel::getConnection(); $con = Propel::getConnection();
$sql = "SELECT login, first_name, last_name, type, id, email, skype_contact, jabber_contact" $sql = "SELECT login, first_name, last_name, type, id, email, cell_phone, skype_contact, jabber_contact"
." FROM cc_subjs" ." FROM cc_subjs"
." WHERE id = $id"; ." WHERE id = $id";

View File

@ -49,6 +49,7 @@ class CcSubjsTableMap extends TableMap {
$this->addColumn('SKYPE_CONTACT', 'DbSkypeContact', 'VARCHAR', false, 255, null); $this->addColumn('SKYPE_CONTACT', 'DbSkypeContact', 'VARCHAR', false, 255, null);
$this->addColumn('JABBER_CONTACT', 'DbJabberContact', 'VARCHAR', false, 255, null); $this->addColumn('JABBER_CONTACT', 'DbJabberContact', 'VARCHAR', false, 255, null);
$this->addColumn('EMAIL', 'DbEmail', 'VARCHAR', false, 255, null); $this->addColumn('EMAIL', 'DbEmail', 'VARCHAR', false, 255, null);
$this->addColumn('CELL_PHONE', 'DbCellPhone', 'VARCHAR', false, 255, null);
$this->addColumn('LOGIN_ATTEMPTS', 'DbLoginAttempts', 'INTEGER', false, null, 0); $this->addColumn('LOGIN_ATTEMPTS', 'DbLoginAttempts', 'INTEGER', false, null, 0);
// validators // validators
} // initialize() } // initialize()

View File

@ -95,6 +95,12 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/ */
protected $email; protected $email;
/**
* The value for the cell_phone field.
* @var string
*/
protected $cell_phone;
/** /**
* The value for the login_attempts field. * The value for the login_attempts field.
* Note: this column has a database default value of: 0 * Note: this column has a database default value of: 0
@ -338,6 +344,16 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return $this->email; return $this->email;
} }
/**
* Get the [cell_phone] column value.
*
* @return string
*/
public function getDbCellPhone()
{
return $this->cell_phone;
}
/** /**
* Get the [login_attempts] column value. * Get the [login_attempts] column value.
* *
@ -626,6 +642,26 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return $this; return $this;
} // setDbEmail() } // setDbEmail()
/**
* Set the value of [cell_phone] column.
*
* @param string $v new value
* @return CcSubjs The current object (for fluent API support)
*/
public function setDbCellPhone($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->cell_phone !== $v) {
$this->cell_phone = $v;
$this->modifiedColumns[] = CcSubjsPeer::CELL_PHONE;
}
return $this;
} // setDbCellPhone()
/** /**
* Set the value of [login_attempts] column. * Set the value of [login_attempts] column.
* *
@ -713,7 +749,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->skype_contact = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null; $this->skype_contact = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
$this->jabber_contact = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null; $this->jabber_contact = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
$this->email = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null; $this->email = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
$this->login_attempts = ($row[$startcol + 11] !== null) ? (int) $row[$startcol + 11] : null; $this->cell_phone = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
$this->login_attempts = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
@ -722,7 +759,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->ensureConsistency(); $this->ensureConsistency();
} }
return $startcol + 12; // 12 = CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 13; // 13 = 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);
@ -1199,6 +1236,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
return $this->getDbEmail(); return $this->getDbEmail();
break; break;
case 11: case 11:
return $this->getDbCellPhone();
break;
case 12:
return $this->getDbLoginAttempts(); return $this->getDbLoginAttempts();
break; break;
default: default:
@ -1235,7 +1275,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$keys[8] => $this->getDbSkypeContact(), $keys[8] => $this->getDbSkypeContact(),
$keys[9] => $this->getDbJabberContact(), $keys[9] => $this->getDbJabberContact(),
$keys[10] => $this->getDbEmail(), $keys[10] => $this->getDbEmail(),
$keys[11] => $this->getDbLoginAttempts(), $keys[11] => $this->getDbCellPhone(),
$keys[12] => $this->getDbLoginAttempts(),
); );
return $result; return $result;
} }
@ -1301,6 +1342,9 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->setDbEmail($value); $this->setDbEmail($value);
break; break;
case 11: case 11:
$this->setDbCellPhone($value);
break;
case 12:
$this->setDbLoginAttempts($value); $this->setDbLoginAttempts($value);
break; break;
} // switch() } // switch()
@ -1338,7 +1382,8 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if (array_key_exists($keys[8], $arr)) $this->setDbSkypeContact($arr[$keys[8]]); if (array_key_exists($keys[8], $arr)) $this->setDbSkypeContact($arr[$keys[8]]);
if (array_key_exists($keys[9], $arr)) $this->setDbJabberContact($arr[$keys[9]]); if (array_key_exists($keys[9], $arr)) $this->setDbJabberContact($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setDbEmail($arr[$keys[10]]); if (array_key_exists($keys[10], $arr)) $this->setDbEmail($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setDbLoginAttempts($arr[$keys[11]]); if (array_key_exists($keys[11], $arr)) $this->setDbCellPhone($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setDbLoginAttempts($arr[$keys[12]]);
} }
/** /**
@ -1361,6 +1406,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
if ($this->isColumnModified(CcSubjsPeer::SKYPE_CONTACT)) $criteria->add(CcSubjsPeer::SKYPE_CONTACT, $this->skype_contact); if ($this->isColumnModified(CcSubjsPeer::SKYPE_CONTACT)) $criteria->add(CcSubjsPeer::SKYPE_CONTACT, $this->skype_contact);
if ($this->isColumnModified(CcSubjsPeer::JABBER_CONTACT)) $criteria->add(CcSubjsPeer::JABBER_CONTACT, $this->jabber_contact); if ($this->isColumnModified(CcSubjsPeer::JABBER_CONTACT)) $criteria->add(CcSubjsPeer::JABBER_CONTACT, $this->jabber_contact);
if ($this->isColumnModified(CcSubjsPeer::EMAIL)) $criteria->add(CcSubjsPeer::EMAIL, $this->email); if ($this->isColumnModified(CcSubjsPeer::EMAIL)) $criteria->add(CcSubjsPeer::EMAIL, $this->email);
if ($this->isColumnModified(CcSubjsPeer::CELL_PHONE)) $criteria->add(CcSubjsPeer::CELL_PHONE, $this->cell_phone);
if ($this->isColumnModified(CcSubjsPeer::LOGIN_ATTEMPTS)) $criteria->add(CcSubjsPeer::LOGIN_ATTEMPTS, $this->login_attempts); if ($this->isColumnModified(CcSubjsPeer::LOGIN_ATTEMPTS)) $criteria->add(CcSubjsPeer::LOGIN_ATTEMPTS, $this->login_attempts);
return $criteria; return $criteria;
@ -1433,6 +1479,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$copyObj->setDbSkypeContact($this->skype_contact); $copyObj->setDbSkypeContact($this->skype_contact);
$copyObj->setDbJabberContact($this->jabber_contact); $copyObj->setDbJabberContact($this->jabber_contact);
$copyObj->setDbEmail($this->email); $copyObj->setDbEmail($this->email);
$copyObj->setDbCellPhone($this->cell_phone);
$copyObj->setDbLoginAttempts($this->login_attempts); $copyObj->setDbLoginAttempts($this->login_attempts);
if ($deepCopy) { if ($deepCopy) {
@ -2471,6 +2518,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
$this->skype_contact = null; $this->skype_contact = null;
$this->jabber_contact = null; $this->jabber_contact = null;
$this->email = null; $this->email = null;
$this->cell_phone = null;
$this->login_attempts = null; $this->login_attempts = null;
$this->alreadyInSave = false; $this->alreadyInSave = false;
$this->alreadyInValidation = false; $this->alreadyInValidation = 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 = 12; const NUM_COLUMNS = 13;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@ -64,6 +64,9 @@ abstract class BaseCcSubjsPeer {
/** the column name for the EMAIL field */ /** the column name for the EMAIL field */
const EMAIL = 'cc_subjs.EMAIL'; const EMAIL = 'cc_subjs.EMAIL';
/** the column name for the CELL_PHONE field */
const CELL_PHONE = 'cc_subjs.CELL_PHONE';
/** the column name for the LOGIN_ATTEMPTS field */ /** the column name for the LOGIN_ATTEMPTS field */
const LOGIN_ATTEMPTS = 'cc_subjs.LOGIN_ATTEMPTS'; const LOGIN_ATTEMPTS = 'cc_subjs.LOGIN_ATTEMPTS';
@ -83,12 +86,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 ('DbId', 'DbLogin', 'DbPass', 'DbType', 'DbFirstName', 'DbLastName', 'DbLastlogin', 'DbLastfail', 'DbSkypeContact', 'DbJabberContact', 'DbEmail', 'DbLoginAttempts', ), BasePeer::TYPE_PHPNAME => array ('DbId', 'DbLogin', 'DbPass', 'DbType', 'DbFirstName', 'DbLastName', 'DbLastlogin', 'DbLastfail', 'DbSkypeContact', 'DbJabberContact', 'DbEmail', 'DbCellPhone', 'DbLoginAttempts', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbLogin', 'dbPass', 'dbType', 'dbFirstName', 'dbLastName', 'dbLastlogin', 'dbLastfail', 'dbSkypeContact', 'dbJabberContact', 'dbEmail', 'dbLoginAttempts', ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbLogin', 'dbPass', 'dbType', 'dbFirstName', 'dbLastName', 'dbLastlogin', 'dbLastfail', 'dbSkypeContact', 'dbJabberContact', 'dbEmail', 'dbCellPhone', 'dbLoginAttempts', ),
BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::FIRST_NAME, self::LAST_NAME, self::LASTLOGIN, self::LASTFAIL, self::SKYPE_CONTACT, self::JABBER_CONTACT, self::EMAIL, self::LOGIN_ATTEMPTS, ), BasePeer::TYPE_COLNAME => array (self::ID, self::LOGIN, self::PASS, self::TYPE, self::FIRST_NAME, self::LAST_NAME, self::LASTLOGIN, self::LASTFAIL, self::SKYPE_CONTACT, self::JABBER_CONTACT, self::EMAIL, self::CELL_PHONE, self::LOGIN_ATTEMPTS, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'FIRST_NAME', 'LAST_NAME', 'LASTLOGIN', 'LASTFAIL', 'SKYPE_CONTACT', 'JABBER_CONTACT', 'EMAIL', 'LOGIN_ATTEMPTS', ), BasePeer::TYPE_RAW_COLNAME => array ('ID', 'LOGIN', 'PASS', 'TYPE', 'FIRST_NAME', 'LAST_NAME', 'LASTLOGIN', 'LASTFAIL', 'SKYPE_CONTACT', 'JABBER_CONTACT', 'EMAIL', 'CELL_PHONE', 'LOGIN_ATTEMPTS', ),
BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'first_name', 'last_name', 'lastlogin', 'lastfail', 'skype_contact', 'jabber_contact', 'email', 'login_attempts', ), BasePeer::TYPE_FIELDNAME => array ('id', 'login', 'pass', 'type', 'first_name', 'last_name', 'lastlogin', 'lastfail', 'skype_contact', 'jabber_contact', 'email', 'cell_phone', 'login_attempts', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
); );
/** /**
@ -98,12 +101,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 ('DbId' => 0, 'DbLogin' => 1, 'DbPass' => 2, 'DbType' => 3, 'DbFirstName' => 4, 'DbLastName' => 5, 'DbLastlogin' => 6, 'DbLastfail' => 7, 'DbSkypeContact' => 8, 'DbJabberContact' => 9, 'DbEmail' => 10, 'DbLoginAttempts' => 11, ), BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbLogin' => 1, 'DbPass' => 2, 'DbType' => 3, 'DbFirstName' => 4, 'DbLastName' => 5, 'DbLastlogin' => 6, 'DbLastfail' => 7, 'DbSkypeContact' => 8, 'DbJabberContact' => 9, 'DbEmail' => 10, 'DbCellPhone' => 11, 'DbLoginAttempts' => 12, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbLogin' => 1, 'dbPass' => 2, 'dbType' => 3, 'dbFirstName' => 4, 'dbLastName' => 5, 'dbLastlogin' => 6, 'dbLastfail' => 7, 'dbSkypeContact' => 8, 'dbJabberContact' => 9, 'dbEmail' => 10, 'dbLoginAttempts' => 11, ), BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbLogin' => 1, 'dbPass' => 2, 'dbType' => 3, 'dbFirstName' => 4, 'dbLastName' => 5, 'dbLastlogin' => 6, 'dbLastfail' => 7, 'dbSkypeContact' => 8, 'dbJabberContact' => 9, 'dbEmail' => 10, 'dbCellPhone' => 11, 'dbLoginAttempts' => 12, ),
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, self::SKYPE_CONTACT => 8, self::JABBER_CONTACT => 9, self::EMAIL => 10, self::LOGIN_ATTEMPTS => 11, ), 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, self::SKYPE_CONTACT => 8, self::JABBER_CONTACT => 9, self::EMAIL => 10, self::CELL_PHONE => 11, self::LOGIN_ATTEMPTS => 12, ),
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'FIRST_NAME' => 4, 'LAST_NAME' => 5, 'LASTLOGIN' => 6, 'LASTFAIL' => 7, 'SKYPE_CONTACT' => 8, 'JABBER_CONTACT' => 9, 'EMAIL' => 10, 'LOGIN_ATTEMPTS' => 11, ), BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'LOGIN' => 1, 'PASS' => 2, 'TYPE' => 3, 'FIRST_NAME' => 4, 'LAST_NAME' => 5, 'LASTLOGIN' => 6, 'LASTFAIL' => 7, 'SKYPE_CONTACT' => 8, 'JABBER_CONTACT' => 9, 'EMAIL' => 10, 'CELL_PHONE' => 11, 'LOGIN_ATTEMPTS' => 12, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'first_name' => 4, 'last_name' => 5, 'lastlogin' => 6, 'lastfail' => 7, 'skype_contact' => 8, 'jabber_contact' => 9, 'email' => 10, 'login_attempts' => 11, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'login' => 1, 'pass' => 2, 'type' => 3, 'first_name' => 4, 'last_name' => 5, 'lastlogin' => 6, 'lastfail' => 7, 'skype_contact' => 8, 'jabber_contact' => 9, 'email' => 10, 'cell_phone' => 11, 'login_attempts' => 12, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
); );
/** /**
@ -186,6 +189,7 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn(CcSubjsPeer::SKYPE_CONTACT); $criteria->addSelectColumn(CcSubjsPeer::SKYPE_CONTACT);
$criteria->addSelectColumn(CcSubjsPeer::JABBER_CONTACT); $criteria->addSelectColumn(CcSubjsPeer::JABBER_CONTACT);
$criteria->addSelectColumn(CcSubjsPeer::EMAIL); $criteria->addSelectColumn(CcSubjsPeer::EMAIL);
$criteria->addSelectColumn(CcSubjsPeer::CELL_PHONE);
$criteria->addSelectColumn(CcSubjsPeer::LOGIN_ATTEMPTS); $criteria->addSelectColumn(CcSubjsPeer::LOGIN_ATTEMPTS);
} else { } else {
$criteria->addSelectColumn($alias . '.ID'); $criteria->addSelectColumn($alias . '.ID');
@ -199,6 +203,7 @@ abstract class BaseCcSubjsPeer {
$criteria->addSelectColumn($alias . '.SKYPE_CONTACT'); $criteria->addSelectColumn($alias . '.SKYPE_CONTACT');
$criteria->addSelectColumn($alias . '.JABBER_CONTACT'); $criteria->addSelectColumn($alias . '.JABBER_CONTACT');
$criteria->addSelectColumn($alias . '.EMAIL'); $criteria->addSelectColumn($alias . '.EMAIL');
$criteria->addSelectColumn($alias . '.CELL_PHONE');
$criteria->addSelectColumn($alias . '.LOGIN_ATTEMPTS'); $criteria->addSelectColumn($alias . '.LOGIN_ATTEMPTS');
} }
} }

View File

@ -17,6 +17,7 @@
* @method CcSubjsQuery orderByDbSkypeContact($order = Criteria::ASC) Order by the skype_contact column * @method CcSubjsQuery orderByDbSkypeContact($order = Criteria::ASC) Order by the skype_contact column
* @method CcSubjsQuery orderByDbJabberContact($order = Criteria::ASC) Order by the jabber_contact column * @method CcSubjsQuery orderByDbJabberContact($order = Criteria::ASC) Order by the jabber_contact column
* @method CcSubjsQuery orderByDbEmail($order = Criteria::ASC) Order by the email column * @method CcSubjsQuery orderByDbEmail($order = Criteria::ASC) Order by the email column
* @method CcSubjsQuery orderByDbCellPhone($order = Criteria::ASC) Order by the cell_phone column
* @method CcSubjsQuery orderByDbLoginAttempts($order = Criteria::ASC) Order by the login_attempts column * @method CcSubjsQuery orderByDbLoginAttempts($order = Criteria::ASC) Order by the login_attempts column
* *
* @method CcSubjsQuery groupByDbId() Group by the id column * @method CcSubjsQuery groupByDbId() Group by the id column
@ -30,6 +31,7 @@
* @method CcSubjsQuery groupByDbSkypeContact() Group by the skype_contact column * @method CcSubjsQuery groupByDbSkypeContact() Group by the skype_contact column
* @method CcSubjsQuery groupByDbJabberContact() Group by the jabber_contact column * @method CcSubjsQuery groupByDbJabberContact() Group by the jabber_contact column
* @method CcSubjsQuery groupByDbEmail() Group by the email column * @method CcSubjsQuery groupByDbEmail() Group by the email column
* @method CcSubjsQuery groupByDbCellPhone() Group by the cell_phone column
* @method CcSubjsQuery groupByDbLoginAttempts() Group by the login_attempts column * @method CcSubjsQuery groupByDbLoginAttempts() Group by the login_attempts 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
@ -82,6 +84,7 @@
* @method CcSubjs findOneByDbSkypeContact(string $skype_contact) Return the first CcSubjs filtered by the skype_contact column * @method CcSubjs findOneByDbSkypeContact(string $skype_contact) Return the first CcSubjs filtered by the skype_contact column
* @method CcSubjs findOneByDbJabberContact(string $jabber_contact) Return the first CcSubjs filtered by the jabber_contact column * @method CcSubjs findOneByDbJabberContact(string $jabber_contact) Return the first CcSubjs filtered by the jabber_contact column
* @method CcSubjs findOneByDbEmail(string $email) Return the first CcSubjs filtered by the email column * @method CcSubjs findOneByDbEmail(string $email) Return the first CcSubjs filtered by the email column
* @method CcSubjs findOneByDbCellPhone(string $cell_phone) Return the first CcSubjs filtered by the cell_phone column
* @method CcSubjs findOneByDbLoginAttempts(int $login_attempts) Return the first CcSubjs filtered by the login_attempts column * @method CcSubjs findOneByDbLoginAttempts(int $login_attempts) Return the first CcSubjs filtered by the login_attempts column
* *
* @method array findByDbId(int $id) Return CcSubjs objects filtered by the id column * @method array findByDbId(int $id) Return CcSubjs objects filtered by the id column
@ -95,6 +98,7 @@
* @method array findByDbSkypeContact(string $skype_contact) Return CcSubjs objects filtered by the skype_contact column * @method array findByDbSkypeContact(string $skype_contact) Return CcSubjs objects filtered by the skype_contact column
* @method array findByDbJabberContact(string $jabber_contact) Return CcSubjs objects filtered by the jabber_contact column * @method array findByDbJabberContact(string $jabber_contact) Return CcSubjs objects filtered by the jabber_contact column
* @method array findByDbEmail(string $email) Return CcSubjs objects filtered by the email column * @method array findByDbEmail(string $email) Return CcSubjs objects filtered by the email column
* @method array findByDbCellPhone(string $cell_phone) Return CcSubjs objects filtered by the cell_phone column
* @method array findByDbLoginAttempts(int $login_attempts) Return CcSubjs objects filtered by the login_attempts column * @method array findByDbLoginAttempts(int $login_attempts) Return CcSubjs objects filtered by the login_attempts column
* *
* @package propel.generator.airtime.om * @package propel.generator.airtime.om
@ -460,6 +464,28 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
return $this->addUsingAlias(CcSubjsPeer::EMAIL, $dbEmail, $comparison); return $this->addUsingAlias(CcSubjsPeer::EMAIL, $dbEmail, $comparison);
} }
/**
* Filter the query on the cell_phone column
*
* @param string $dbCellPhone 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 filterByDbCellPhone($dbCellPhone = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbCellPhone)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbCellPhone)) {
$dbCellPhone = str_replace('*', '%', $dbCellPhone);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcSubjsPeer::CELL_PHONE, $dbCellPhone, $comparison);
}
/** /**
* Filter the query on the login_attempts column * Filter the query on the login_attempts column
* *

View File

@ -330,6 +330,7 @@
<column name="skype_contact" phpName="DbSkypeContact" type="VARCHAR" required="false"/> <column name="skype_contact" phpName="DbSkypeContact" type="VARCHAR" required="false"/>
<column name="jabber_contact" phpName="DbJabberContact" type="VARCHAR" required="false"/> <column name="jabber_contact" phpName="DbJabberContact" type="VARCHAR" required="false"/>
<column name="email" phpName="DbEmail" type="VARCHAR" required="false"/> <column name="email" phpName="DbEmail" type="VARCHAR" required="false"/>
<column name="cell_phone" phpName="DbCellPhone" type="VARCHAR" required="false"/>
<column name="login_attempts" phpName="DbLoginAttempts" type="INTEGER" required="false" defaultValue="0"/> <column name="login_attempts" phpName="DbLoginAttempts" type="INTEGER" required="false" defaultValue="0"/>
<unique name="cc_subjs_id_idx"> <unique name="cc_subjs_id_idx">
<unique-column name="id"/> <unique-column name="id"/>

View File

@ -451,6 +451,7 @@ CREATE TABLE "cc_subjs"
"skype_contact" VARCHAR(255), "skype_contact" VARCHAR(255),
"jabber_contact" VARCHAR(255), "jabber_contact" VARCHAR(255),
"email" VARCHAR(255), "email" VARCHAR(255),
"cell_phone" VARCHAR(255),
"login_attempts" INTEGER default 0, "login_attempts" INTEGER default 0,
PRIMARY KEY ("id"), PRIMARY KEY ("id"),
CONSTRAINT "cc_subjs_id_idx" UNIQUE ("id"), CONSTRAINT "cc_subjs_id_idx" UNIQUE ("id"),

View File

@ -10,6 +10,7 @@ function populateForm(entries){
$('#last_name').val(entries.last_name); $('#last_name').val(entries.last_name);
$('#type').val(entries.type); $('#type').val(entries.type);
$('#email').val(entries.email); $('#email').val(entries.email);
$('#cell_phone').val(entries.cell_phone);
$('#skype').val(entries.skype_contact); $('#skype').val(entries.skype_contact);
$('#jabber').val(entries.jabber_contact); $('#jabber').val(entries.jabber_contact);