Added administrator preferred locale (see issue #183)
This commit is contained in:
@@ -31,7 +31,7 @@ class Admin extends BaseAdmin implements UserInterface
|
||||
{
|
||||
$profileId = $this->getProfileId();
|
||||
|
||||
if( null === $profileId ) {
|
||||
if( null === $profileId || 0 === $profileId ) {
|
||||
return AdminResources::SUPERADMINISTRATOR;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,12 @@ abstract class Admin implements ActiveRecordInterface
|
||||
*/
|
||||
protected $password;
|
||||
|
||||
/**
|
||||
* The value for the locale field.
|
||||
* @var string
|
||||
*/
|
||||
protected $locale;
|
||||
|
||||
/**
|
||||
* The value for the algo field.
|
||||
* @var string
|
||||
@@ -465,6 +471,17 @@ abstract class Admin implements ActiveRecordInterface
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [locale] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [algo] column value.
|
||||
*
|
||||
@@ -679,6 +696,27 @@ abstract class Admin implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setPassword()
|
||||
|
||||
/**
|
||||
* Set the value of [locale] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Admin The current object (for fluent API support)
|
||||
*/
|
||||
public function setLocale($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->locale !== $v) {
|
||||
$this->locale = $v;
|
||||
$this->modifiedColumns[AdminTableMap::LOCALE] = true;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setLocale()
|
||||
|
||||
/**
|
||||
* Set the value of [algo] column.
|
||||
*
|
||||
@@ -860,25 +898,28 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : AdminTableMap::translateFieldName('Password', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->password = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : AdminTableMap::translateFieldName('Algo', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : AdminTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->locale = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : AdminTableMap::translateFieldName('Algo', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->algo = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : AdminTableMap::translateFieldName('Salt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : AdminTableMap::translateFieldName('Salt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->salt = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : AdminTableMap::translateFieldName('RememberMeToken', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : AdminTableMap::translateFieldName('RememberMeToken', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->remember_me_token = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : AdminTableMap::translateFieldName('RememberMeSerial', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : AdminTableMap::translateFieldName('RememberMeSerial', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->remember_me_serial = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : AdminTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : AdminTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : AdminTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : AdminTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -891,7 +932,7 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 12; // 12 = AdminTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 13; // 13 = AdminTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Admin object", 0, $e);
|
||||
@@ -1145,6 +1186,9 @@ abstract class Admin implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(AdminTableMap::PASSWORD)) {
|
||||
$modifiedColumns[':p' . $index++] = '`PASSWORD`';
|
||||
}
|
||||
if ($this->isColumnModified(AdminTableMap::LOCALE)) {
|
||||
$modifiedColumns[':p' . $index++] = '`LOCALE`';
|
||||
}
|
||||
if ($this->isColumnModified(AdminTableMap::ALGO)) {
|
||||
$modifiedColumns[':p' . $index++] = '`ALGO`';
|
||||
}
|
||||
@@ -1192,6 +1236,9 @@ abstract class Admin implements ActiveRecordInterface
|
||||
case '`PASSWORD`':
|
||||
$stmt->bindValue($identifier, $this->password, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`LOCALE`':
|
||||
$stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR);
|
||||
break;
|
||||
case '`ALGO`':
|
||||
$stmt->bindValue($identifier, $this->algo, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1291,21 +1338,24 @@ abstract class Admin implements ActiveRecordInterface
|
||||
return $this->getPassword();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getAlgo();
|
||||
return $this->getLocale();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getSalt();
|
||||
return $this->getAlgo();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getRememberMeToken();
|
||||
return $this->getSalt();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getRememberMeSerial();
|
||||
return $this->getRememberMeToken();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getCreatedAt();
|
||||
return $this->getRememberMeSerial();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1343,12 +1393,13 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$keys[3] => $this->getLastname(),
|
||||
$keys[4] => $this->getLogin(),
|
||||
$keys[5] => $this->getPassword(),
|
||||
$keys[6] => $this->getAlgo(),
|
||||
$keys[7] => $this->getSalt(),
|
||||
$keys[8] => $this->getRememberMeToken(),
|
||||
$keys[9] => $this->getRememberMeSerial(),
|
||||
$keys[10] => $this->getCreatedAt(),
|
||||
$keys[11] => $this->getUpdatedAt(),
|
||||
$keys[6] => $this->getLocale(),
|
||||
$keys[7] => $this->getAlgo(),
|
||||
$keys[8] => $this->getSalt(),
|
||||
$keys[9] => $this->getRememberMeToken(),
|
||||
$keys[10] => $this->getRememberMeSerial(),
|
||||
$keys[11] => $this->getCreatedAt(),
|
||||
$keys[12] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach ($virtualColumns as $key => $virtualColumn) {
|
||||
@@ -1412,21 +1463,24 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$this->setPassword($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setAlgo($value);
|
||||
$this->setLocale($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setSalt($value);
|
||||
$this->setAlgo($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setRememberMeToken($value);
|
||||
$this->setSalt($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setRememberMeSerial($value);
|
||||
$this->setRememberMeToken($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setCreatedAt($value);
|
||||
$this->setRememberMeSerial($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1459,12 +1513,13 @@ abstract class Admin implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[3], $arr)) $this->setLastname($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setLogin($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setPassword($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setAlgo($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setSalt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setRememberMeToken($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setRememberMeSerial($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setCreatedAt($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setUpdatedAt($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setLocale($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setAlgo($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setSalt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setRememberMeToken($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setRememberMeSerial($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setCreatedAt($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setUpdatedAt($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1482,6 +1537,7 @@ abstract class Admin implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(AdminTableMap::LASTNAME)) $criteria->add(AdminTableMap::LASTNAME, $this->lastname);
|
||||
if ($this->isColumnModified(AdminTableMap::LOGIN)) $criteria->add(AdminTableMap::LOGIN, $this->login);
|
||||
if ($this->isColumnModified(AdminTableMap::PASSWORD)) $criteria->add(AdminTableMap::PASSWORD, $this->password);
|
||||
if ($this->isColumnModified(AdminTableMap::LOCALE)) $criteria->add(AdminTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(AdminTableMap::ALGO)) $criteria->add(AdminTableMap::ALGO, $this->algo);
|
||||
if ($this->isColumnModified(AdminTableMap::SALT)) $criteria->add(AdminTableMap::SALT, $this->salt);
|
||||
if ($this->isColumnModified(AdminTableMap::REMEMBER_ME_TOKEN)) $criteria->add(AdminTableMap::REMEMBER_ME_TOKEN, $this->remember_me_token);
|
||||
@@ -1556,6 +1612,7 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$copyObj->setLastname($this->getLastname());
|
||||
$copyObj->setLogin($this->getLogin());
|
||||
$copyObj->setPassword($this->getPassword());
|
||||
$copyObj->setLocale($this->getLocale());
|
||||
$copyObj->setAlgo($this->getAlgo());
|
||||
$copyObj->setSalt($this->getSalt());
|
||||
$copyObj->setRememberMeToken($this->getRememberMeToken());
|
||||
@@ -1652,6 +1709,7 @@ abstract class Admin implements ActiveRecordInterface
|
||||
$this->lastname = null;
|
||||
$this->login = null;
|
||||
$this->password = null;
|
||||
$this->locale = null;
|
||||
$this->algo = null;
|
||||
$this->salt = null;
|
||||
$this->remember_me_token = null;
|
||||
|
||||
@@ -27,6 +27,7 @@ use Thelia\Model\Map\AdminTableMap;
|
||||
* @method ChildAdminQuery orderByLastname($order = Criteria::ASC) Order by the lastname column
|
||||
* @method ChildAdminQuery orderByLogin($order = Criteria::ASC) Order by the login column
|
||||
* @method ChildAdminQuery orderByPassword($order = Criteria::ASC) Order by the password column
|
||||
* @method ChildAdminQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildAdminQuery orderByAlgo($order = Criteria::ASC) Order by the algo column
|
||||
* @method ChildAdminQuery orderBySalt($order = Criteria::ASC) Order by the salt column
|
||||
* @method ChildAdminQuery orderByRememberMeToken($order = Criteria::ASC) Order by the remember_me_token column
|
||||
@@ -40,6 +41,7 @@ use Thelia\Model\Map\AdminTableMap;
|
||||
* @method ChildAdminQuery groupByLastname() Group by the lastname column
|
||||
* @method ChildAdminQuery groupByLogin() Group by the login column
|
||||
* @method ChildAdminQuery groupByPassword() Group by the password column
|
||||
* @method ChildAdminQuery groupByLocale() Group by the locale column
|
||||
* @method ChildAdminQuery groupByAlgo() Group by the algo column
|
||||
* @method ChildAdminQuery groupBySalt() Group by the salt column
|
||||
* @method ChildAdminQuery groupByRememberMeToken() Group by the remember_me_token column
|
||||
@@ -64,6 +66,7 @@ use Thelia\Model\Map\AdminTableMap;
|
||||
* @method ChildAdmin findOneByLastname(string $lastname) Return the first ChildAdmin filtered by the lastname column
|
||||
* @method ChildAdmin findOneByLogin(string $login) Return the first ChildAdmin filtered by the login column
|
||||
* @method ChildAdmin findOneByPassword(string $password) Return the first ChildAdmin filtered by the password column
|
||||
* @method ChildAdmin findOneByLocale(string $locale) Return the first ChildAdmin filtered by the locale column
|
||||
* @method ChildAdmin findOneByAlgo(string $algo) Return the first ChildAdmin filtered by the algo column
|
||||
* @method ChildAdmin findOneBySalt(string $salt) Return the first ChildAdmin filtered by the salt column
|
||||
* @method ChildAdmin findOneByRememberMeToken(string $remember_me_token) Return the first ChildAdmin filtered by the remember_me_token column
|
||||
@@ -77,6 +80,7 @@ use Thelia\Model\Map\AdminTableMap;
|
||||
* @method array findByLastname(string $lastname) Return ChildAdmin objects filtered by the lastname column
|
||||
* @method array findByLogin(string $login) Return ChildAdmin objects filtered by the login column
|
||||
* @method array findByPassword(string $password) Return ChildAdmin objects filtered by the password column
|
||||
* @method array findByLocale(string $locale) Return ChildAdmin objects filtered by the locale column
|
||||
* @method array findByAlgo(string $algo) Return ChildAdmin objects filtered by the algo column
|
||||
* @method array findBySalt(string $salt) Return ChildAdmin objects filtered by the salt column
|
||||
* @method array findByRememberMeToken(string $remember_me_token) Return ChildAdmin objects filtered by the remember_me_token column
|
||||
@@ -171,7 +175,7 @@ abstract class AdminQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT `ID`, `PROFILE_ID`, `FIRSTNAME`, `LASTNAME`, `LOGIN`, `PASSWORD`, `ALGO`, `SALT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `CREATED_AT`, `UPDATED_AT` FROM `admin` WHERE `ID` = :p0';
|
||||
$sql = 'SELECT `ID`, `PROFILE_ID`, `FIRSTNAME`, `LASTNAME`, `LOGIN`, `PASSWORD`, `LOCALE`, `ALGO`, `SALT`, `REMEMBER_ME_TOKEN`, `REMEMBER_ME_SERIAL`, `CREATED_AT`, `UPDATED_AT` FROM `admin` WHERE `ID` = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -460,6 +464,35 @@ abstract class AdminQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(AdminTableMap::PASSWORD, $password, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the locale column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue'
|
||||
* $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $locale 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 ChildAdminQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByLocale($locale = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($locale)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $locale)) {
|
||||
$locale = str_replace('*', '%', $locale);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AdminTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the algo column
|
||||
*
|
||||
|
||||
@@ -58,7 +58,7 @@ class AdminTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 12;
|
||||
const NUM_COLUMNS = 13;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -68,7 +68,7 @@ class AdminTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 12;
|
||||
const NUM_HYDRATE_COLUMNS = 13;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -100,6 +100,11 @@ class AdminTableMap extends TableMap
|
||||
*/
|
||||
const PASSWORD = 'admin.PASSWORD';
|
||||
|
||||
/**
|
||||
* the column name for the LOCALE field
|
||||
*/
|
||||
const LOCALE = 'admin.LOCALE';
|
||||
|
||||
/**
|
||||
* the column name for the ALGO field
|
||||
*/
|
||||
@@ -142,12 +147,12 @@ class AdminTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'ProfileId', 'Firstname', 'Lastname', 'Login', 'Password', 'Algo', 'Salt', 'RememberMeToken', 'RememberMeSerial', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'profileId', 'firstname', 'lastname', 'login', 'password', 'algo', 'salt', 'rememberMeToken', 'rememberMeSerial', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(AdminTableMap::ID, AdminTableMap::PROFILE_ID, AdminTableMap::FIRSTNAME, AdminTableMap::LASTNAME, AdminTableMap::LOGIN, AdminTableMap::PASSWORD, AdminTableMap::ALGO, AdminTableMap::SALT, AdminTableMap::REMEMBER_ME_TOKEN, AdminTableMap::REMEMBER_ME_SERIAL, AdminTableMap::CREATED_AT, AdminTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'PROFILE_ID', 'FIRSTNAME', 'LASTNAME', 'LOGIN', 'PASSWORD', 'ALGO', 'SALT', 'REMEMBER_ME_TOKEN', 'REMEMBER_ME_SERIAL', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'profile_id', 'firstname', 'lastname', 'login', 'password', 'algo', 'salt', 'remember_me_token', 'remember_me_serial', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
self::TYPE_PHPNAME => array('Id', 'ProfileId', 'Firstname', 'Lastname', 'Login', 'Password', 'Locale', 'Algo', 'Salt', 'RememberMeToken', 'RememberMeSerial', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'profileId', 'firstname', 'lastname', 'login', 'password', 'locale', 'algo', 'salt', 'rememberMeToken', 'rememberMeSerial', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(AdminTableMap::ID, AdminTableMap::PROFILE_ID, AdminTableMap::FIRSTNAME, AdminTableMap::LASTNAME, AdminTableMap::LOGIN, AdminTableMap::PASSWORD, AdminTableMap::LOCALE, AdminTableMap::ALGO, AdminTableMap::SALT, AdminTableMap::REMEMBER_ME_TOKEN, AdminTableMap::REMEMBER_ME_SERIAL, AdminTableMap::CREATED_AT, AdminTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'PROFILE_ID', 'FIRSTNAME', 'LASTNAME', 'LOGIN', 'PASSWORD', 'LOCALE', 'ALGO', 'SALT', 'REMEMBER_ME_TOKEN', 'REMEMBER_ME_SERIAL', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'profile_id', 'firstname', 'lastname', 'login', 'password', 'locale', 'algo', 'salt', 'remember_me_token', 'remember_me_serial', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -157,12 +162,12 @@ class AdminTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'ProfileId' => 1, 'Firstname' => 2, 'Lastname' => 3, 'Login' => 4, 'Password' => 5, 'Algo' => 6, 'Salt' => 7, 'RememberMeToken' => 8, 'RememberMeSerial' => 9, 'CreatedAt' => 10, 'UpdatedAt' => 11, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'profileId' => 1, 'firstname' => 2, 'lastname' => 3, 'login' => 4, 'password' => 5, 'algo' => 6, 'salt' => 7, 'rememberMeToken' => 8, 'rememberMeSerial' => 9, 'createdAt' => 10, 'updatedAt' => 11, ),
|
||||
self::TYPE_COLNAME => array(AdminTableMap::ID => 0, AdminTableMap::PROFILE_ID => 1, AdminTableMap::FIRSTNAME => 2, AdminTableMap::LASTNAME => 3, AdminTableMap::LOGIN => 4, AdminTableMap::PASSWORD => 5, AdminTableMap::ALGO => 6, AdminTableMap::SALT => 7, AdminTableMap::REMEMBER_ME_TOKEN => 8, AdminTableMap::REMEMBER_ME_SERIAL => 9, AdminTableMap::CREATED_AT => 10, AdminTableMap::UPDATED_AT => 11, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PROFILE_ID' => 1, 'FIRSTNAME' => 2, 'LASTNAME' => 3, 'LOGIN' => 4, 'PASSWORD' => 5, 'ALGO' => 6, 'SALT' => 7, 'REMEMBER_ME_TOKEN' => 8, 'REMEMBER_ME_SERIAL' => 9, 'CREATED_AT' => 10, 'UPDATED_AT' => 11, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'profile_id' => 1, 'firstname' => 2, 'lastname' => 3, 'login' => 4, 'password' => 5, 'algo' => 6, 'salt' => 7, 'remember_me_token' => 8, 'remember_me_serial' => 9, 'created_at' => 10, 'updated_at' => 11, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'ProfileId' => 1, 'Firstname' => 2, 'Lastname' => 3, 'Login' => 4, 'Password' => 5, 'Locale' => 6, 'Algo' => 7, 'Salt' => 8, 'RememberMeToken' => 9, 'RememberMeSerial' => 10, 'CreatedAt' => 11, 'UpdatedAt' => 12, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'profileId' => 1, 'firstname' => 2, 'lastname' => 3, 'login' => 4, 'password' => 5, 'locale' => 6, 'algo' => 7, 'salt' => 8, 'rememberMeToken' => 9, 'rememberMeSerial' => 10, 'createdAt' => 11, 'updatedAt' => 12, ),
|
||||
self::TYPE_COLNAME => array(AdminTableMap::ID => 0, AdminTableMap::PROFILE_ID => 1, AdminTableMap::FIRSTNAME => 2, AdminTableMap::LASTNAME => 3, AdminTableMap::LOGIN => 4, AdminTableMap::PASSWORD => 5, AdminTableMap::LOCALE => 6, AdminTableMap::ALGO => 7, AdminTableMap::SALT => 8, AdminTableMap::REMEMBER_ME_TOKEN => 9, AdminTableMap::REMEMBER_ME_SERIAL => 10, AdminTableMap::CREATED_AT => 11, AdminTableMap::UPDATED_AT => 12, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PROFILE_ID' => 1, 'FIRSTNAME' => 2, 'LASTNAME' => 3, 'LOGIN' => 4, 'PASSWORD' => 5, 'LOCALE' => 6, 'ALGO' => 7, 'SALT' => 8, 'REMEMBER_ME_TOKEN' => 9, 'REMEMBER_ME_SERIAL' => 10, 'CREATED_AT' => 11, 'UPDATED_AT' => 12, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'profile_id' => 1, 'firstname' => 2, 'lastname' => 3, 'login' => 4, 'password' => 5, 'locale' => 6, 'algo' => 7, 'salt' => 8, 'remember_me_token' => 9, 'remember_me_serial' => 10, 'created_at' => 11, 'updated_at' => 12, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -187,6 +192,7 @@ class AdminTableMap extends TableMap
|
||||
$this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 100, null);
|
||||
$this->addColumn('LOGIN', 'Login', 'VARCHAR', true, 100, null);
|
||||
$this->addColumn('PASSWORD', 'Password', 'VARCHAR', true, 128, null);
|
||||
$this->addColumn('LOCALE', 'Locale', 'VARCHAR', true, 45, null);
|
||||
$this->addColumn('ALGO', 'Algo', 'VARCHAR', false, 128, null);
|
||||
$this->addColumn('SALT', 'Salt', 'VARCHAR', false, 128, null);
|
||||
$this->addColumn('REMEMBER_ME_TOKEN', 'RememberMeToken', 'VARCHAR', false, 255, null);
|
||||
@@ -360,6 +366,7 @@ class AdminTableMap extends TableMap
|
||||
$criteria->addSelectColumn(AdminTableMap::LASTNAME);
|
||||
$criteria->addSelectColumn(AdminTableMap::LOGIN);
|
||||
$criteria->addSelectColumn(AdminTableMap::PASSWORD);
|
||||
$criteria->addSelectColumn(AdminTableMap::LOCALE);
|
||||
$criteria->addSelectColumn(AdminTableMap::ALGO);
|
||||
$criteria->addSelectColumn(AdminTableMap::SALT);
|
||||
$criteria->addSelectColumn(AdminTableMap::REMEMBER_ME_TOKEN);
|
||||
@@ -373,6 +380,7 @@ class AdminTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.LASTNAME');
|
||||
$criteria->addSelectColumn($alias . '.LOGIN');
|
||||
$criteria->addSelectColumn($alias . '.PASSWORD');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
$criteria->addSelectColumn($alias . '.ALGO');
|
||||
$criteria->addSelectColumn($alias . '.SALT');
|
||||
$criteria->addSelectColumn($alias . '.REMEMBER_ME_TOKEN');
|
||||
|
||||
Reference in New Issue
Block a user