diff --git a/Rakefile b/Rakefile index c136e6dcf..765930aaf 100755 --- a/Rakefile +++ b/Rakefile @@ -78,6 +78,16 @@ task :build => [:required] do system "npm install --loglevel=error --prefix #{Dir.pwd}/workflow/engine/methods/authenticationSources" system "npm run build --prefix #{Dir.pwd}/workflow/engine/methods/authenticationSources" + puts "\n\n" + puts "Building: Extended Attributes".cyan + system "npm install --loglevel=error --prefix #{Dir.pwd}/workflow/engine/methods/userExtendedAttributes" + system "npm run build --prefix #{Dir.pwd}/workflow/engine/methods/userExtendedAttributes" + + puts "\n\n" + puts "Building: Personal Information".cyan + system "npm install --loglevel=error --prefix #{Dir.pwd}/workflow/engine/methods/userPersonalInformation" + system "npm run build --prefix #{Dir.pwd}/workflow/engine/methods/userPersonalInformation" + hashVendors = pmuiHash+"-"+mafeHash ## Building minified JS Files puts "Building file: " + "/js/mafe-#{hashVendors}.js".cyan diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php index e631d1faa..02d0af81e 100644 --- a/gulliver/system/class.rbac.php +++ b/gulliver/system/class.rbac.php @@ -181,6 +181,7 @@ class RBAC 'historyDynaformGridPreview' => ['PM_CASES'], ], 'usersAjax.php' => [ + 'timeZoneParameters' => ['PM_LOGIN'], 'countryList' => ['PM_LOGIN'], 'stateList' => ['PM_LOGIN'], 'locationList' => ['PM_LOGIN'], diff --git a/workflow/engine/classes/model/UserExtendedAttributes.php b/workflow/engine/classes/model/UserExtendedAttributes.php new file mode 100644 index 000000000..4e03eff74 --- /dev/null +++ b/workflow/engine/classes/model/UserExtendedAttributes.php @@ -0,0 +1,19 @@ +dbMap !== null); + } + + /** + * Gets the databasemap this map builder built. + * + * @return the databasemap + */ + public function getDatabaseMap() + { + return $this->dbMap; + } + + /** + * The doBuild() method builds the DatabaseMap + * + * @return void + * @throws PropelException + */ + public function doBuild() + { + $this->dbMap = Propel::getDatabaseMap('workflow'); + + $tMap = $this->dbMap->addTable('USER_EXTENDED_ATTRIBUTES'); + $tMap->setPhpName('UserExtendedAttributes'); + + $tMap->setUseIdGenerator(true); + + $tMap->addPrimaryKey('UEA_ID', 'UeaId', 'string', CreoleTypes::BIGINT, true, 20); + + $tMap->addColumn('UEA_NAME', 'UeaName', 'string', CreoleTypes::VARCHAR, false, 255); + + $tMap->addColumn('UEA_ATTRIBUTE_ID', 'UeaAttributeId', 'string', CreoleTypes::VARCHAR, false, 255); + + $tMap->addColumn('UEA_HIDDEN', 'UeaHidden', 'int', CreoleTypes::INTEGER, false, null); + + $tMap->addColumn('UEA_REQUIRED', 'UeaRequired', 'int', CreoleTypes::INTEGER, false, null); + + $tMap->addColumn('UEA_PASSWORD', 'UeaPassword', 'int', CreoleTypes::INTEGER, false, null); + + $tMap->addColumn('UEA_OPTION', 'UeaOption', 'string', CreoleTypes::VARCHAR, false, 255); + + $tMap->addColumn('UEA_ROLES', 'UeaRoles', 'string', CreoleTypes::LONGVARCHAR, false, null); + + $tMap->addColumn('UEA_OWNER', 'UeaOwner', 'string', CreoleTypes::BIGINT, false, 20); + + $tMap->addColumn('UEA_DATE_CREATE', 'UeaDateCreate', 'int', CreoleTypes::TIMESTAMP, false, null); + + } // doBuild() + +} // UserExtendedAttributesMapBuilder diff --git a/workflow/engine/classes/model/map/UsersMapBuilder.php b/workflow/engine/classes/model/map/UsersMapBuilder.php index e1468d431..750f6dbd2 100644 --- a/workflow/engine/classes/model/map/UsersMapBuilder.php +++ b/workflow/engine/classes/model/map/UsersMapBuilder.php @@ -135,6 +135,8 @@ class UsersMapBuilder $tMap->addColumn('USR_LAST_LOGIN', 'UsrLastLogin', 'int', CreoleTypes::TIMESTAMP, false, null); + $tMap->addColumn('USR_EXTENDED_ATTRIBUTES_DATA', 'UsrExtendedAttributesData', 'string', CreoleTypes::LONGVARCHAR, false, null); + $tMap->addValidator('USR_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|VACATION|CLOSED', 'Please select a valid type.'); $tMap->addValidator('USR_STATUS', 'required', 'propel.validator.RequiredValidator', '', 'Type is required.'); diff --git a/workflow/engine/classes/model/om/BaseUserExtendedAttributes.php b/workflow/engine/classes/model/om/BaseUserExtendedAttributes.php new file mode 100644 index 000000000..69620f6d1 --- /dev/null +++ b/workflow/engine/classes/model/om/BaseUserExtendedAttributes.php @@ -0,0 +1,1062 @@ +uea_id; + } + + /** + * Get the [uea_name] column value. + * + * @return string + */ + public function getUeaName() + { + + return $this->uea_name; + } + + /** + * Get the [uea_attribute_id] column value. + * + * @return string + */ + public function getUeaAttributeId() + { + + return $this->uea_attribute_id; + } + + /** + * Get the [uea_hidden] column value. + * + * @return int + */ + public function getUeaHidden() + { + + return $this->uea_hidden; + } + + /** + * Get the [uea_required] column value. + * + * @return int + */ + public function getUeaRequired() + { + + return $this->uea_required; + } + + /** + * Get the [uea_password] column value. + * + * @return int + */ + public function getUeaPassword() + { + + return $this->uea_password; + } + + /** + * Get the [uea_option] column value. + * + * @return string + */ + public function getUeaOption() + { + + return $this->uea_option; + } + + /** + * Get the [uea_roles] column value. + * + * @return string + */ + public function getUeaRoles() + { + + return $this->uea_roles; + } + + /** + * Get the [uea_owner] column value. + * + * @return string + */ + public function getUeaOwner() + { + + return $this->uea_owner; + } + + /** + * Get the [optionally formatted] [uea_date_create] column value. + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the integer unix timestamp will be returned. + * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). + * @throws PropelException - if unable to convert the date/time to timestamp. + */ + public function getUeaDateCreate($format = 'Y-m-d H:i:s') + { + + if ($this->uea_date_create === null || $this->uea_date_create === '') { + return null; + } elseif (!is_int($this->uea_date_create)) { + // a non-timestamp value was set externally, so we convert it + $ts = strtotime($this->uea_date_create); + if ($ts === -1 || $ts === false) { + throw new PropelException("Unable to parse value of [uea_date_create] as date/time value: " . + var_export($this->uea_date_create, true)); + } + } else { + $ts = $this->uea_date_create; + } + if ($format === null) { + return $ts; + } elseif (strpos($format, '%') !== false) { + return strftime($format, $ts); + } else { + return date($format, $ts); + } + } + + /** + * Set the value of [uea_id] column. + * + * @param string $v new value + * @return void + */ + public function setUeaId($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_id !== $v) { + $this->uea_id = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_ID; + } + + } // setUeaId() + + /** + * Set the value of [uea_name] column. + * + * @param string $v new value + * @return void + */ + public function setUeaName($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_name !== $v) { + $this->uea_name = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_NAME; + } + + } // setUeaName() + + /** + * Set the value of [uea_attribute_id] column. + * + * @param string $v new value + * @return void + */ + public function setUeaAttributeId($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_attribute_id !== $v) { + $this->uea_attribute_id = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID; + } + + } // setUeaAttributeId() + + /** + * Set the value of [uea_hidden] column. + * + * @param int $v new value + * @return void + */ + public function setUeaHidden($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->uea_hidden !== $v) { + $this->uea_hidden = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_HIDDEN; + } + + } // setUeaHidden() + + /** + * Set the value of [uea_required] column. + * + * @param int $v new value + * @return void + */ + public function setUeaRequired($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->uea_required !== $v) { + $this->uea_required = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_REQUIRED; + } + + } // setUeaRequired() + + /** + * Set the value of [uea_password] column. + * + * @param int $v new value + * @return void + */ + public function setUeaPassword($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->uea_password !== $v) { + $this->uea_password = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_PASSWORD; + } + + } // setUeaPassword() + + /** + * Set the value of [uea_option] column. + * + * @param string $v new value + * @return void + */ + public function setUeaOption($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_option !== $v) { + $this->uea_option = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_OPTION; + } + + } // setUeaOption() + + /** + * Set the value of [uea_roles] column. + * + * @param string $v new value + * @return void + */ + public function setUeaRoles($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_roles !== $v) { + $this->uea_roles = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_ROLES; + } + + } // setUeaRoles() + + /** + * Set the value of [uea_owner] column. + * + * @param string $v new value + * @return void + */ + public function setUeaOwner($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->uea_owner !== $v) { + $this->uea_owner = $v; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_OWNER; + } + + } // setUeaOwner() + + /** + * Set the value of [uea_date_create] column. + * + * @param int $v new value + * @return void + */ + public function setUeaDateCreate($v) + { + + if ($v !== null && !is_int($v)) { + $ts = strtotime($v); + //Date/time accepts null values + if ($v == '') { + $ts = null; + } + if ($ts === -1 || $ts === false) { + throw new PropelException("Unable to parse date/time value for [uea_date_create] from input: " . + var_export($v, true)); + } + } else { + $ts = $v; + } + if ($this->uea_date_create !== $ts) { + $this->uea_date_create = $ts; + $this->modifiedColumns[] = UserExtendedAttributesPeer::UEA_DATE_CREATE; + } + + } // setUeaDateCreate() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (1-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. + * @param int $startcol 1-based offset column which indicates which restultset column to start with. + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate(ResultSet $rs, $startcol = 1) + { + try { + + $this->uea_id = $rs->getString($startcol + 0); + + $this->uea_name = $rs->getString($startcol + 1); + + $this->uea_attribute_id = $rs->getString($startcol + 2); + + $this->uea_hidden = $rs->getInt($startcol + 3); + + $this->uea_required = $rs->getInt($startcol + 4); + + $this->uea_password = $rs->getInt($startcol + 5); + + $this->uea_option = $rs->getString($startcol + 6); + + $this->uea_roles = $rs->getString($startcol + 7); + + $this->uea_owner = $rs->getString($startcol + 8); + + $this->uea_date_create = $rs->getTimestamp($startcol + 9, null); + + $this->resetModified(); + + $this->setNew(false); + + // FIXME - using NUM_COLUMNS may be clearer. + return $startcol + 10; // 10 = UserExtendedAttributesPeer::NUM_COLUMNS - UserExtendedAttributesPeer::NUM_LAZY_LOAD_COLUMNS). + + } catch (Exception $e) { + throw new PropelException("Error populating UserExtendedAttributes object", $e); + } + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param Connection $con + * @return void + * @throws PropelException + * @see BaseObject::setDeleted() + * @see BaseObject::isDeleted() + */ + public function delete($con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(UserExtendedAttributesPeer::DATABASE_NAME); + } + + try { + $con->begin(); + UserExtendedAttributesPeer::doDelete($this, $con); + $this->setDeleted(true); + $con->commit(); + } catch (PropelException $e) { + $con->rollback(); + throw $e; + } + } + + /** + * Stores the object in the database. If the object is new, + * it inserts it; otherwise an update is performed. This method + * wraps the doSave() worker method in a transaction. + * + * @param Connection $con + * @return int The number of rows affected by this insert/update + * @throws PropelException + * @see doSave() + */ + public function save($con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getConnection(UserExtendedAttributesPeer::DATABASE_NAME); + } + + try { + $con->begin(); + $affectedRows = $this->doSave($con); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollback(); + throw $e; + } + } + + /** + * Stores the object in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param Connection $con + * @return int The number of rows affected by this insert/update and any referring + * @throws PropelException + * @see save() + */ + protected function doSave($con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + + // If this object has been modified, then save it to the database. + if ($this->isModified()) { + if ($this->isNew()) { + $pk = UserExtendedAttributesPeer::doInsert($this, $con); + $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which + // should always be true here (even though technically + // BasePeer::doInsert() can insert multiple rows). + + $this->setUeaId($pk); //[IMV] update autoincrement primary key + + $this->setNew(false); + } else { + $affectedRows += UserExtendedAttributesPeer::doUpdate($this, $con); + } + $this->resetModified(); // [HL] After being saved an object is no longer 'modified' + } + + $this->alreadyInSave = false; + } + return $affectedRows; + } // doSave() + + /** + * Array of ValidationFailed objects. + * @var array ValidationFailed[] + */ + protected $validationFailures = array(); + + /** + * Gets any ValidationFailed objects that resulted from last call to validate(). + * + * + * @return array ValidationFailed[] + * @see validate() + */ + public function getValidationFailures() + { + return $this->validationFailures; + } + + /** + * Validates the objects modified field values and all objects related to this table. + * + * If $columns is either a column name or an array of column names + * only those columns are validated. + * + * @param mixed $columns Column name or an array of column names. + * @return boolean Whether all columns pass validation. + * @see doValidate() + * @see getValidationFailures() + */ + public function validate($columns = null) + { + $res = $this->doValidate($columns); + if ($res === true) { + $this->validationFailures = array(); + return true; + } else { + $this->validationFailures = $res; + return false; + } + } + + /** + * This function performs the validation work for complex object models. + * + * In addition to checking the current object, all related objects will + * also be validated. If all pass then true is returned; otherwise + * an aggreagated array of ValidationFailed objects will be returned. + * + * @param array $columns Array of column names to validate. + * @return mixed true if all validations pass; + array of ValidationFailed objects otherwise. + */ + protected function doValidate($columns = null) + { + if (!$this->alreadyInValidation) { + $this->alreadyInValidation = true; + $retval = null; + + $failureMap = array(); + + + if (($retval = UserExtendedAttributesPeer::doValidate($this, $columns)) !== true) { + $failureMap = array_merge($failureMap, $retval); + } + + + + $this->alreadyInValidation = false; + } + + return (!empty($failureMap) ? $failureMap : true); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return mixed Value of field. + */ + public function getByName($name, $type = BasePeer::TYPE_PHPNAME) + { + $pos = UserExtendedAttributesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->getByPosition($pos); + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch($pos) { + case 0: + return $this->getUeaId(); + break; + case 1: + return $this->getUeaName(); + break; + case 2: + return $this->getUeaAttributeId(); + break; + case 3: + return $this->getUeaHidden(); + break; + case 4: + return $this->getUeaRequired(); + break; + case 5: + return $this->getUeaPassword(); + break; + case 6: + return $this->getUeaOption(); + break; + case 7: + return $this->getUeaRoles(); + break; + case 8: + return $this->getUeaOwner(); + break; + case 9: + return $this->getUeaDateCreate(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = BasePeer::TYPE_PHPNAME) + { + $keys = UserExtendedAttributesPeer::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getUeaId(), + $keys[1] => $this->getUeaName(), + $keys[2] => $this->getUeaAttributeId(), + $keys[3] => $this->getUeaHidden(), + $keys[4] => $this->getUeaRequired(), + $keys[5] => $this->getUeaPassword(), + $keys[6] => $this->getUeaOption(), + $keys[7] => $this->getUeaRoles(), + $keys[8] => $this->getUeaOwner(), + $keys[9] => $this->getUeaDateCreate(), + ); + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name peer name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return void + */ + public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME) + { + $pos = UserExtendedAttributesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM); + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch($pos) { + case 0: + $this->setUeaId($value); + break; + case 1: + $this->setUeaName($value); + break; + case 2: + $this->setUeaAttributeId($value); + break; + case 3: + $this->setUeaHidden($value); + break; + case 4: + $this->setUeaRequired($value); + break; + case 5: + $this->setUeaPassword($value); + break; + case 6: + $this->setUeaOption($value); + break; + case 7: + $this->setUeaRoles($value); + break; + case 8: + $this->setUeaOwner($value); + break; + case 9: + $this->setUeaDateCreate($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, + * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) + { + $keys = UserExtendedAttributesPeer::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) { + $this->setUeaId($arr[$keys[0]]); + } + + if (array_key_exists($keys[1], $arr)) { + $this->setUeaName($arr[$keys[1]]); + } + + if (array_key_exists($keys[2], $arr)) { + $this->setUeaAttributeId($arr[$keys[2]]); + } + + if (array_key_exists($keys[3], $arr)) { + $this->setUeaHidden($arr[$keys[3]]); + } + + if (array_key_exists($keys[4], $arr)) { + $this->setUeaRequired($arr[$keys[4]]); + } + + if (array_key_exists($keys[5], $arr)) { + $this->setUeaPassword($arr[$keys[5]]); + } + + if (array_key_exists($keys[6], $arr)) { + $this->setUeaOption($arr[$keys[6]]); + } + + if (array_key_exists($keys[7], $arr)) { + $this->setUeaRoles($arr[$keys[7]]); + } + + if (array_key_exists($keys[8], $arr)) { + $this->setUeaOwner($arr[$keys[8]]); + } + + if (array_key_exists($keys[9], $arr)) { + $this->setUeaDateCreate($arr[$keys[9]]); + } + + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(UserExtendedAttributesPeer::DATABASE_NAME); + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_ID)) { + $criteria->add(UserExtendedAttributesPeer::UEA_ID, $this->uea_id); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_NAME)) { + $criteria->add(UserExtendedAttributesPeer::UEA_NAME, $this->uea_name); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID)) { + $criteria->add(UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID, $this->uea_attribute_id); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_HIDDEN)) { + $criteria->add(UserExtendedAttributesPeer::UEA_HIDDEN, $this->uea_hidden); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_REQUIRED)) { + $criteria->add(UserExtendedAttributesPeer::UEA_REQUIRED, $this->uea_required); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_PASSWORD)) { + $criteria->add(UserExtendedAttributesPeer::UEA_PASSWORD, $this->uea_password); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_OPTION)) { + $criteria->add(UserExtendedAttributesPeer::UEA_OPTION, $this->uea_option); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_ROLES)) { + $criteria->add(UserExtendedAttributesPeer::UEA_ROLES, $this->uea_roles); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_OWNER)) { + $criteria->add(UserExtendedAttributesPeer::UEA_OWNER, $this->uea_owner); + } + + if ($this->isColumnModified(UserExtendedAttributesPeer::UEA_DATE_CREATE)) { + $criteria->add(UserExtendedAttributesPeer::UEA_DATE_CREATE, $this->uea_date_create); + } + + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(UserExtendedAttributesPeer::DATABASE_NAME); + + $criteria->add(UserExtendedAttributesPeer::UEA_ID, $this->uea_id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return string + */ + public function getPrimaryKey() + { + return $this->getUeaId(); + } + + /** + * Generic method to set the primary key (uea_id column). + * + * @param string $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setUeaId($key); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of UserExtendedAttributes (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false) + { + + $copyObj->setUeaName($this->uea_name); + + $copyObj->setUeaAttributeId($this->uea_attribute_id); + + $copyObj->setUeaHidden($this->uea_hidden); + + $copyObj->setUeaRequired($this->uea_required); + + $copyObj->setUeaPassword($this->uea_password); + + $copyObj->setUeaOption($this->uea_option); + + $copyObj->setUeaRoles($this->uea_roles); + + $copyObj->setUeaOwner($this->uea_owner); + + $copyObj->setUeaDateCreate($this->uea_date_create); + + + $copyObj->setNew(true); + + $copyObj->setUeaId(NULL); // this is a pkey column, so set to default value + + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return UserExtendedAttributes Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + return $copyObj; + } + + /** + * Returns a peer instance associated with this om. + * + * Since Peer classes are not to have any instance attributes, this method returns the + * same instance for all member of this class. The method could therefore + * be static, but this would prevent one from overriding the behavior. + * + * @return UserExtendedAttributesPeer + */ + public function getPeer() + { + if (self::$peer === null) { + self::$peer = new UserExtendedAttributesPeer(); + } + return self::$peer; + } +} + diff --git a/workflow/engine/classes/model/om/BaseUserExtendedAttributesPeer.php b/workflow/engine/classes/model/om/BaseUserExtendedAttributesPeer.php new file mode 100644 index 000000000..cd92b47b6 --- /dev/null +++ b/workflow/engine/classes/model/om/BaseUserExtendedAttributesPeer.php @@ -0,0 +1,614 @@ + array ('UeaId', 'UeaName', 'UeaAttributeId', 'UeaHidden', 'UeaRequired', 'UeaPassword', 'UeaOption', 'UeaRoles', 'UeaOwner', 'UeaDateCreate', ), + BasePeer::TYPE_COLNAME => array (UserExtendedAttributesPeer::UEA_ID, UserExtendedAttributesPeer::UEA_NAME, UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID, UserExtendedAttributesPeer::UEA_HIDDEN, UserExtendedAttributesPeer::UEA_REQUIRED, UserExtendedAttributesPeer::UEA_PASSWORD, UserExtendedAttributesPeer::UEA_OPTION, UserExtendedAttributesPeer::UEA_ROLES, UserExtendedAttributesPeer::UEA_OWNER, UserExtendedAttributesPeer::UEA_DATE_CREATE, ), + BasePeer::TYPE_FIELDNAME => array ('UEA_ID', 'UEA_NAME', 'UEA_ATTRIBUTE_ID', 'UEA_HIDDEN', 'UEA_REQUIRED', 'UEA_PASSWORD', 'UEA_OPTION', 'UEA_ROLES', 'UEA_OWNER', 'UEA_DATE_CREATE', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 + */ + private static $fieldKeys = array ( + BasePeer::TYPE_PHPNAME => array ('UeaId' => 0, 'UeaName' => 1, 'UeaAttributeId' => 2, 'UeaHidden' => 3, 'UeaRequired' => 4, 'UeaPassword' => 5, 'UeaOption' => 6, 'UeaRoles' => 7, 'UeaOwner' => 8, 'UeaDateCreate' => 9, ), + BasePeer::TYPE_COLNAME => array (UserExtendedAttributesPeer::UEA_ID => 0, UserExtendedAttributesPeer::UEA_NAME => 1, UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID => 2, UserExtendedAttributesPeer::UEA_HIDDEN => 3, UserExtendedAttributesPeer::UEA_REQUIRED => 4, UserExtendedAttributesPeer::UEA_PASSWORD => 5, UserExtendedAttributesPeer::UEA_OPTION => 6, UserExtendedAttributesPeer::UEA_ROLES => 7, UserExtendedAttributesPeer::UEA_OWNER => 8, UserExtendedAttributesPeer::UEA_DATE_CREATE => 9, ), + BasePeer::TYPE_FIELDNAME => array ('UEA_ID' => 0, 'UEA_NAME' => 1, 'UEA_ATTRIBUTE_ID' => 2, 'UEA_HIDDEN' => 3, 'UEA_REQUIRED' => 4, 'UEA_PASSWORD' => 5, 'UEA_OPTION' => 6, 'UEA_ROLES' => 7, 'UEA_OWNER' => 8, 'UEA_DATE_CREATE' => 9, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ) + ); + + /** + * @return MapBuilder the map builder for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getMapBuilder() + { + include_once 'classes/model/map/UserExtendedAttributesMapBuilder.php'; + return BasePeer::getMapBuilder('classes.model.map.UserExtendedAttributesMapBuilder'); + } + /** + * Gets a map (hash) of PHP names to DB column names. + * + * @return array The PHP to DB name map for this peer + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. + */ + public static function getPhpNameMap() + { + if (self::$phpNameMap === null) { + $map = UserExtendedAttributesPeer::getTableMap(); + $columns = $map->getColumns(); + $nameMap = array(); + foreach ($columns as $column) { + $nameMap[$column->getPhpName()] = $column->getColumnName(); + } + self::$phpNameMap = $nameMap; + } + return self::$phpNameMap; + } + /** + * Translates a fieldname to another type + * + * @param string $name field name + * @param string $fromType One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @param string $toType One of the class type constants + * @return string translated name of the field. + */ + static public function translateFieldName($name, $fromType, $toType) + { + $toNames = self::getFieldNames($toType); + $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; + if ($key === null) { + throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); + } + return $toNames[$key]; + } + + /** + * Returns an array of of field names. + * + * @param string $type The type of fieldnames to return: + * One of the class type constants TYPE_PHPNAME, + * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM + * @return array A list of field names + */ + + static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) + { + if (!array_key_exists($type, self::$fieldNames)) { + throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); + } + return self::$fieldNames[$type]; + } + + /** + * Convenience method which changes table.column to alias.column. + * + * Using this method you can maintain SQL abstraction while using column aliases. + * + * $c->addAlias("alias1", TablePeer::TABLE_NAME); + * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); + * + * @param string $alias The alias for the current table. + * @param string $column The column name for current table. (i.e. UserExtendedAttributesPeer::COLUMN_NAME). + * @return string + */ + public static function alias($alias, $column) + { + return str_replace(UserExtendedAttributesPeer::TABLE_NAME.'.', $alias.'.', $column); + } + + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param criteria object containing the columns to add. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria) + { + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_ID); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_NAME); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_ATTRIBUTE_ID); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_HIDDEN); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_REQUIRED); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_PASSWORD); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_OPTION); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_ROLES); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_OWNER); + + $criteria->addSelectColumn(UserExtendedAttributesPeer::UEA_DATE_CREATE); + + } + + const COUNT = 'COUNT(USER_EXTENDED_ATTRIBUTES.UEA_ID)'; + const COUNT_DISTINCT = 'COUNT(DISTINCT USER_EXTENDED_ATTRIBUTES.UEA_ID)'; + + /** + * Returns the number of rows matching criteria. + * + * @param Criteria $criteria + * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). + * @param Connection $con + * @return int Number of matching rows. + */ + public static function doCount(Criteria $criteria, $distinct = false, $con = null) + { + // we're going to modify criteria, so copy it first + $criteria = clone $criteria; + + // clear out anything that might confuse the ORDER BY clause + $criteria->clearSelectColumns()->clearOrderByColumns(); + if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { + $criteria->addSelectColumn(UserExtendedAttributesPeer::COUNT_DISTINCT); + } else { + $criteria->addSelectColumn(UserExtendedAttributesPeer::COUNT); + } + + // just in case we're grouping: add those columns to the select statement + foreach ($criteria->getGroupByColumns() as $column) { + $criteria->addSelectColumn($column); + } + + $rs = UserExtendedAttributesPeer::doSelectRS($criteria, $con); + if ($rs->next()) { + return $rs->getInt(1); + } else { + // no rows returned; we infer that means 0 matches. + return 0; + } + } + /** + * Method to select one object from the DB. + * + * @param Criteria $criteria object used to create the SELECT statement. + * @param Connection $con + * @return UserExtendedAttributes + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelectOne(Criteria $criteria, $con = null) + { + $critcopy = clone $criteria; + $critcopy->setLimit(1); + $objects = UserExtendedAttributesPeer::doSelect($critcopy, $con); + if ($objects) { + return $objects[0]; + } + return null; + } + /** + * Method to do selects. + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con + * @return array Array of selected Objects + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doSelect(Criteria $criteria, $con = null) + { + return UserExtendedAttributesPeer::populateObjects(UserExtendedAttributesPeer::doSelectRS($criteria, $con)); + } + /** + * Prepares the Criteria object and uses the parent doSelect() + * method to get a ResultSet. + * + * Use this method directly if you want to just get the resultset + * (instead of an array of objects). + * + * @param Criteria $criteria The Criteria object used to build the SELECT statement. + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return ResultSet The resultset object with numerically-indexed fields. + * @see BasePeer::doSelect() + */ + public static function doSelectRS(Criteria $criteria, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + + if (!$criteria->getSelectColumns()) { + $criteria = clone $criteria; + UserExtendedAttributesPeer::addSelectColumns($criteria); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + // BasePeer returns a Creole ResultSet, set to return + // rows indexed numerically. + return BasePeer::doSelect($criteria, $con); + } + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(ResultSet $rs) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = UserExtendedAttributesPeer::getOMClass(); + $cls = Propel::import($cls); + // populate the object(s) + while ($rs->next()) { + + $obj = new $cls(); + $obj->hydrate($rs); + $results[] = $obj; + + } + return $results; + } + /** + * Returns the TableMap related to this peer. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); + } + + /** + * The class that the Peer will make instances of. + * + * This uses a dot-path notation which is tranalted into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @return string path.to.ClassName + */ + public static function getOMClass() + { + return UserExtendedAttributesPeer::CLASS_DEFAULT; + } + + /** + * Method perform an INSERT on the database, given a UserExtendedAttributes or Criteria object. + * + * @param mixed $values Criteria or UserExtendedAttributes object containing data that is used to create the INSERT statement. + * @param Connection $con the connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($values, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } else { + $criteria = $values->buildCriteria(); // build Criteria from UserExtendedAttributes object + } + + //$criteria->remove(UserExtendedAttributesPeer::UEA_ID); // remove pkey col since this table uses auto-increment + + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->begin(); + $pk = BasePeer::doInsert($criteria, $con); + $con->commit(); + } catch (PropelException $e) { + $con->rollback(); + throw $e; + } + + return $pk; + } + + /** + * Method perform an UPDATE on the database, given a UserExtendedAttributes or Criteria object. + * + * @param mixed $values Criteria or UserExtendedAttributes object containing data create the UPDATE statement. + * @param Connection $con The connection to use (specify Connection exert more control over transactions). + * @return int The number of affected rows (if supported by underlying database driver). + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doUpdate($values, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + + $selectCriteria = new Criteria(self::DATABASE_NAME); + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + + $comparison = $criteria->getComparison(UserExtendedAttributesPeer::UEA_ID); + $selectCriteria->add(UserExtendedAttributesPeer::UEA_ID, $criteria->remove(UserExtendedAttributesPeer::UEA_ID), $comparison); + + } else { + $criteria = $values->buildCriteria(); // gets full criteria + $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) + } + + // set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + return BasePeer::doUpdate($selectCriteria, $criteria, $con); + } + + /** + * Method to DELETE all rows from the USER_EXTENDED_ATTRIBUTES table. + * + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll($con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->begin(); + $affectedRows += BasePeer::doDeleteAll(UserExtendedAttributesPeer::TABLE_NAME, $con); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollback(); + throw $e; + } + } + + /** + * Method perform a DELETE on the database, given a UserExtendedAttributes or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or UserExtendedAttributes object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param Connection $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + * This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(UserExtendedAttributesPeer::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + $criteria = clone $values; // rename for clarity + } elseif ($values instanceof UserExtendedAttributes) { + + $criteria = $values->buildPkeyCriteria(); + } else { + // it must be the primary key + $criteria = new Criteria(self::DATABASE_NAME); + $criteria->add(UserExtendedAttributesPeer::UEA_ID, (array) $values, Criteria::IN); + } + + // Set the correct dbName + $criteria->setDbName(self::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->begin(); + + $affectedRows += BasePeer::doDelete($criteria, $con); + $con->commit(); + return $affectedRows; + } catch (PropelException $e) { + $con->rollback(); + throw $e; + } + } + + /** + * Validates all modified columns of given UserExtendedAttributes object. + * If parameter $columns is either a single column name or an array of column names + * than only those columns are validated. + * + * NOTICE: This does not apply to primary or foreign keys for now. + * + * @param UserExtendedAttributes $obj The object to validate. + * @param mixed $cols Column name or array of column names. + * + * @return mixed TRUE if all columns are valid or the error message of the first invalid column. + */ + public static function doValidate(UserExtendedAttributes $obj, $cols = null) + { + $columns = array(); + + if ($cols) { + $dbMap = Propel::getDatabaseMap(UserExtendedAttributesPeer::DATABASE_NAME); + $tableMap = $dbMap->getTable(UserExtendedAttributesPeer::TABLE_NAME); + + if (! is_array($cols)) { + $cols = array($cols); + } + + foreach ($cols as $colName) { + if ($tableMap->containsColumn($colName)) { + $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); + $columns[$colName] = $obj->$get(); + } + } + } else { + + } + + return BasePeer::doValidate(UserExtendedAttributesPeer::DATABASE_NAME, UserExtendedAttributesPeer::TABLE_NAME, $columns); + } + + /** + * Retrieve a single object by pkey. + * + * @param mixed $pk the primary key. + * @param Connection $con the connection to use + * @return UserExtendedAttributes + */ + public static function retrieveByPK($pk, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + + $criteria = new Criteria(UserExtendedAttributesPeer::DATABASE_NAME); + + $criteria->add(UserExtendedAttributesPeer::UEA_ID, $pk); + + + $v = UserExtendedAttributesPeer::doSelect($criteria, $con); + + return !empty($v) > 0 ? $v[0] : null; + } + + /** + * Retrieve multiple objects by pkey. + * + * @param array $pks List of primary keys + * @param Connection $con the connection to use + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function retrieveByPKs($pks, $con = null) + { + if ($con === null) { + $con = Propel::getConnection(self::DATABASE_NAME); + } + + $objs = null; + if (empty($pks)) { + $objs = array(); + } else { + $criteria = new Criteria(); + $criteria->add(UserExtendedAttributesPeer::UEA_ID, $pks, Criteria::IN); + $objs = UserExtendedAttributesPeer::doSelect($criteria, $con); + } + return $objs; + } +} + + +// static code to register the map builder for this Peer with the main Propel class +if (Propel::isInit()) { + // the MapBuilder classes register themselves with Propel during initialization + // so we need to load them here. + try { + BaseUserExtendedAttributesPeer::getMapBuilder(); + } catch (Exception $e) { + Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); + } +} else { + // even if Propel is not yet initialized, the map builder class can be registered + // now and then it will be loaded when Propel initializes. + require_once 'classes/model/map/UserExtendedAttributesMapBuilder.php'; + Propel::registerMapBuilder('classes.model.map.UserExtendedAttributesMapBuilder'); +} + diff --git a/workflow/engine/classes/model/om/BaseUsers.php b/workflow/engine/classes/model/om/BaseUsers.php index ba4587d95..ab1cc967a 100644 --- a/workflow/engine/classes/model/om/BaseUsers.php +++ b/workflow/engine/classes/model/om/BaseUsers.php @@ -237,6 +237,12 @@ abstract class BaseUsers extends BaseObject implements Persistent */ protected $usr_last_login; + /** + * The value for the usr_extended_attributes_data field. + * @var string + */ + protected $usr_extended_attributes_data; + /** * Flag to prevent endless save loop, if this object is referenced * by another object which falls in this transaction. @@ -741,6 +747,17 @@ abstract class BaseUsers extends BaseObject implements Persistent } } + /** + * Get the [usr_extended_attributes_data] column value. + * + * @return string + */ + public function getUsrExtendedAttributesData() + { + + return $this->usr_extended_attributes_data; + } + /** * Set the value of [usr_uid] column. * @@ -1540,6 +1557,28 @@ abstract class BaseUsers extends BaseObject implements Persistent } // setUsrLastLogin() + /** + * Set the value of [usr_extended_attributes_data] column. + * + * @param string $v new value + * @return void + */ + public function setUsrExtendedAttributesData($v) + { + + // Since the native PHP type for this column is string, + // we will cast the input to a string (if it is not). + if ($v !== null && !is_string($v)) { + $v = (string) $v; + } + + if ($this->usr_extended_attributes_data !== $v) { + $this->usr_extended_attributes_data = $v; + $this->modifiedColumns[] = UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA; + } + + } // setUsrExtendedAttributesData() + /** * Hydrates (populates) the object variables with values from the database resultset. * @@ -1627,12 +1666,14 @@ abstract class BaseUsers extends BaseObject implements Persistent $this->usr_last_login = $rs->getTimestamp($startcol + 34, null); + $this->usr_extended_attributes_data = $rs->getString($startcol + 35); + $this->resetModified(); $this->setNew(false); // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 35; // 35 = UsersPeer::NUM_COLUMNS - UsersPeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 36; // 36 = UsersPeer::NUM_COLUMNS - UsersPeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating Users object", $e); @@ -1941,6 +1982,9 @@ abstract class BaseUsers extends BaseObject implements Persistent case 34: return $this->getUsrLastLogin(); break; + case 35: + return $this->getUsrExtendedAttributesData(); + break; default: return null; break; @@ -1996,6 +2040,7 @@ abstract class BaseUsers extends BaseObject implements Persistent $keys[32] => $this->getUsrTimeZone(), $keys[33] => $this->getUsrDefaultLang(), $keys[34] => $this->getUsrLastLogin(), + $keys[35] => $this->getUsrExtendedAttributesData(), ); return $result; } @@ -2132,6 +2177,9 @@ abstract class BaseUsers extends BaseObject implements Persistent case 34: $this->setUsrLastLogin($value); break; + case 35: + $this->setUsrExtendedAttributesData($value); + break; } // switch() } @@ -2295,6 +2343,10 @@ abstract class BaseUsers extends BaseObject implements Persistent $this->setUsrLastLogin($arr[$keys[34]]); } + if (array_key_exists($keys[35], $arr)) { + $this->setUsrExtendedAttributesData($arr[$keys[35]]); + } + } /** @@ -2446,6 +2498,10 @@ abstract class BaseUsers extends BaseObject implements Persistent $criteria->add(UsersPeer::USR_LAST_LOGIN, $this->usr_last_login); } + if ($this->isColumnModified(UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA)) { + $criteria->add(UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA, $this->usr_extended_attributes_data); + } + return $criteria; } @@ -2568,6 +2624,8 @@ abstract class BaseUsers extends BaseObject implements Persistent $copyObj->setUsrLastLogin($this->usr_last_login); + $copyObj->setUsrExtendedAttributesData($this->usr_extended_attributes_data); + $copyObj->setNew(true); diff --git a/workflow/engine/classes/model/om/BaseUsersPeer.php b/workflow/engine/classes/model/om/BaseUsersPeer.php index 7dcc5a1fa..67b087cd0 100644 --- a/workflow/engine/classes/model/om/BaseUsersPeer.php +++ b/workflow/engine/classes/model/om/BaseUsersPeer.php @@ -25,7 +25,7 @@ abstract class BaseUsersPeer const CLASS_DEFAULT = 'classes.model.Users'; /** The total number of columns. */ - const NUM_COLUMNS = 35; + const NUM_COLUMNS = 36; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -136,6 +136,9 @@ abstract class BaseUsersPeer /** the column name for the USR_LAST_LOGIN field */ const USR_LAST_LOGIN = 'USERS.USR_LAST_LOGIN'; + /** the column name for the USR_EXTENDED_ATTRIBUTES_DATA field */ + const USR_EXTENDED_ATTRIBUTES_DATA = 'USERS.USR_EXTENDED_ATTRIBUTES_DATA'; + /** The PHP to DB Name Mapping */ private static $phpNameMap = null; @@ -147,10 +150,10 @@ abstract class BaseUsersPeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrId', 'UsrUsername', 'UsrPassword', 'UsrFirstname', 'UsrLastname', 'UsrEmail', 'UsrDueDate', 'UsrCreateDate', 'UsrUpdateDate', 'UsrStatus', 'UsrStatusId', 'UsrCountry', 'UsrCity', 'UsrLocation', 'UsrAddress', 'UsrPhone', 'UsrFax', 'UsrCellular', 'UsrZipCode', 'DepUid', 'UsrPosition', 'UsrResume', 'UsrBirthday', 'UsrRole', 'UsrReportsTo', 'UsrReplacedBy', 'UsrUx', 'UsrCostByHour', 'UsrUnitCost', 'UsrPmdriveFolderUid', 'UsrBookmarkStartCases', 'UsrTimeZone', 'UsrDefaultLang', 'UsrLastLogin', ), - BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID, UsersPeer::USR_ID, UsersPeer::USR_USERNAME, UsersPeer::USR_PASSWORD, UsersPeer::USR_FIRSTNAME, UsersPeer::USR_LASTNAME, UsersPeer::USR_EMAIL, UsersPeer::USR_DUE_DATE, UsersPeer::USR_CREATE_DATE, UsersPeer::USR_UPDATE_DATE, UsersPeer::USR_STATUS, UsersPeer::USR_STATUS_ID, UsersPeer::USR_COUNTRY, UsersPeer::USR_CITY, UsersPeer::USR_LOCATION, UsersPeer::USR_ADDRESS, UsersPeer::USR_PHONE, UsersPeer::USR_FAX, UsersPeer::USR_CELLULAR, UsersPeer::USR_ZIP_CODE, UsersPeer::DEP_UID, UsersPeer::USR_POSITION, UsersPeer::USR_RESUME, UsersPeer::USR_BIRTHDAY, UsersPeer::USR_ROLE, UsersPeer::USR_REPORTS_TO, UsersPeer::USR_REPLACED_BY, UsersPeer::USR_UX, UsersPeer::USR_COST_BY_HOUR, UsersPeer::USR_UNIT_COST, UsersPeer::USR_PMDRIVE_FOLDER_UID, UsersPeer::USR_BOOKMARK_START_CASES, UsersPeer::USR_TIME_ZONE, UsersPeer::USR_DEFAULT_LANG, UsersPeer::USR_LAST_LOGIN, ), - BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_ID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_FIRSTNAME', 'USR_LASTNAME', 'USR_EMAIL', 'USR_DUE_DATE', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_STATUS', 'USR_STATUS_ID', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'USR_ADDRESS', 'USR_PHONE', 'USR_FAX', 'USR_CELLULAR', 'USR_ZIP_CODE', 'DEP_UID', 'USR_POSITION', 'USR_RESUME', 'USR_BIRTHDAY', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX', 'USR_COST_BY_HOUR', 'USR_UNIT_COST', 'USR_PMDRIVE_FOLDER_UID', 'USR_BOOKMARK_START_CASES', 'USR_TIME_ZONE', 'USR_DEFAULT_LANG', 'USR_LAST_LOGIN', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ) + BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrId', 'UsrUsername', 'UsrPassword', 'UsrFirstname', 'UsrLastname', 'UsrEmail', 'UsrDueDate', 'UsrCreateDate', 'UsrUpdateDate', 'UsrStatus', 'UsrStatusId', 'UsrCountry', 'UsrCity', 'UsrLocation', 'UsrAddress', 'UsrPhone', 'UsrFax', 'UsrCellular', 'UsrZipCode', 'DepUid', 'UsrPosition', 'UsrResume', 'UsrBirthday', 'UsrRole', 'UsrReportsTo', 'UsrReplacedBy', 'UsrUx', 'UsrCostByHour', 'UsrUnitCost', 'UsrPmdriveFolderUid', 'UsrBookmarkStartCases', 'UsrTimeZone', 'UsrDefaultLang', 'UsrLastLogin', 'UsrExtendedAttributesData', ), + BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID, UsersPeer::USR_ID, UsersPeer::USR_USERNAME, UsersPeer::USR_PASSWORD, UsersPeer::USR_FIRSTNAME, UsersPeer::USR_LASTNAME, UsersPeer::USR_EMAIL, UsersPeer::USR_DUE_DATE, UsersPeer::USR_CREATE_DATE, UsersPeer::USR_UPDATE_DATE, UsersPeer::USR_STATUS, UsersPeer::USR_STATUS_ID, UsersPeer::USR_COUNTRY, UsersPeer::USR_CITY, UsersPeer::USR_LOCATION, UsersPeer::USR_ADDRESS, UsersPeer::USR_PHONE, UsersPeer::USR_FAX, UsersPeer::USR_CELLULAR, UsersPeer::USR_ZIP_CODE, UsersPeer::DEP_UID, UsersPeer::USR_POSITION, UsersPeer::USR_RESUME, UsersPeer::USR_BIRTHDAY, UsersPeer::USR_ROLE, UsersPeer::USR_REPORTS_TO, UsersPeer::USR_REPLACED_BY, UsersPeer::USR_UX, UsersPeer::USR_COST_BY_HOUR, UsersPeer::USR_UNIT_COST, UsersPeer::USR_PMDRIVE_FOLDER_UID, UsersPeer::USR_BOOKMARK_START_CASES, UsersPeer::USR_TIME_ZONE, UsersPeer::USR_DEFAULT_LANG, UsersPeer::USR_LAST_LOGIN, UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA, ), + BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_ID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_FIRSTNAME', 'USR_LASTNAME', 'USR_EMAIL', 'USR_DUE_DATE', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_STATUS', 'USR_STATUS_ID', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'USR_ADDRESS', 'USR_PHONE', 'USR_FAX', 'USR_CELLULAR', 'USR_ZIP_CODE', 'DEP_UID', 'USR_POSITION', 'USR_RESUME', 'USR_BIRTHDAY', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX', 'USR_COST_BY_HOUR', 'USR_UNIT_COST', 'USR_PMDRIVE_FOLDER_UID', 'USR_BOOKMARK_START_CASES', 'USR_TIME_ZONE', 'USR_DEFAULT_LANG', 'USR_LAST_LOGIN', 'USR_EXTENDED_ATTRIBUTES_DATA', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ) ); /** @@ -160,10 +163,10 @@ abstract class BaseUsersPeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrId' => 1, 'UsrUsername' => 2, 'UsrPassword' => 3, 'UsrFirstname' => 4, 'UsrLastname' => 5, 'UsrEmail' => 6, 'UsrDueDate' => 7, 'UsrCreateDate' => 8, 'UsrUpdateDate' => 9, 'UsrStatus' => 10, 'UsrStatusId' => 11, 'UsrCountry' => 12, 'UsrCity' => 13, 'UsrLocation' => 14, 'UsrAddress' => 15, 'UsrPhone' => 16, 'UsrFax' => 17, 'UsrCellular' => 18, 'UsrZipCode' => 19, 'DepUid' => 20, 'UsrPosition' => 21, 'UsrResume' => 22, 'UsrBirthday' => 23, 'UsrRole' => 24, 'UsrReportsTo' => 25, 'UsrReplacedBy' => 26, 'UsrUx' => 27, 'UsrCostByHour' => 28, 'UsrUnitCost' => 29, 'UsrPmdriveFolderUid' => 30, 'UsrBookmarkStartCases' => 31, 'UsrTimeZone' => 32, 'UsrDefaultLang' => 33, 'UsrLastLogin' => 34, ), - BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID => 0, UsersPeer::USR_ID => 1, UsersPeer::USR_USERNAME => 2, UsersPeer::USR_PASSWORD => 3, UsersPeer::USR_FIRSTNAME => 4, UsersPeer::USR_LASTNAME => 5, UsersPeer::USR_EMAIL => 6, UsersPeer::USR_DUE_DATE => 7, UsersPeer::USR_CREATE_DATE => 8, UsersPeer::USR_UPDATE_DATE => 9, UsersPeer::USR_STATUS => 10, UsersPeer::USR_STATUS_ID => 11, UsersPeer::USR_COUNTRY => 12, UsersPeer::USR_CITY => 13, UsersPeer::USR_LOCATION => 14, UsersPeer::USR_ADDRESS => 15, UsersPeer::USR_PHONE => 16, UsersPeer::USR_FAX => 17, UsersPeer::USR_CELLULAR => 18, UsersPeer::USR_ZIP_CODE => 19, UsersPeer::DEP_UID => 20, UsersPeer::USR_POSITION => 21, UsersPeer::USR_RESUME => 22, UsersPeer::USR_BIRTHDAY => 23, UsersPeer::USR_ROLE => 24, UsersPeer::USR_REPORTS_TO => 25, UsersPeer::USR_REPLACED_BY => 26, UsersPeer::USR_UX => 27, UsersPeer::USR_COST_BY_HOUR => 28, UsersPeer::USR_UNIT_COST => 29, UsersPeer::USR_PMDRIVE_FOLDER_UID => 30, UsersPeer::USR_BOOKMARK_START_CASES => 31, UsersPeer::USR_TIME_ZONE => 32, UsersPeer::USR_DEFAULT_LANG => 33, UsersPeer::USR_LAST_LOGIN => 34, ), - BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_ID' => 1, 'USR_USERNAME' => 2, 'USR_PASSWORD' => 3, 'USR_FIRSTNAME' => 4, 'USR_LASTNAME' => 5, 'USR_EMAIL' => 6, 'USR_DUE_DATE' => 7, 'USR_CREATE_DATE' => 8, 'USR_UPDATE_DATE' => 9, 'USR_STATUS' => 10, 'USR_STATUS_ID' => 11, 'USR_COUNTRY' => 12, 'USR_CITY' => 13, 'USR_LOCATION' => 14, 'USR_ADDRESS' => 15, 'USR_PHONE' => 16, 'USR_FAX' => 17, 'USR_CELLULAR' => 18, 'USR_ZIP_CODE' => 19, 'DEP_UID' => 20, 'USR_POSITION' => 21, 'USR_RESUME' => 22, 'USR_BIRTHDAY' => 23, 'USR_ROLE' => 24, 'USR_REPORTS_TO' => 25, 'USR_REPLACED_BY' => 26, 'USR_UX' => 27, 'USR_COST_BY_HOUR' => 28, 'USR_UNIT_COST' => 29, 'USR_PMDRIVE_FOLDER_UID' => 30, 'USR_BOOKMARK_START_CASES' => 31, 'USR_TIME_ZONE' => 32, 'USR_DEFAULT_LANG' => 33, 'USR_LAST_LOGIN' => 34, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ) + BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrId' => 1, 'UsrUsername' => 2, 'UsrPassword' => 3, 'UsrFirstname' => 4, 'UsrLastname' => 5, 'UsrEmail' => 6, 'UsrDueDate' => 7, 'UsrCreateDate' => 8, 'UsrUpdateDate' => 9, 'UsrStatus' => 10, 'UsrStatusId' => 11, 'UsrCountry' => 12, 'UsrCity' => 13, 'UsrLocation' => 14, 'UsrAddress' => 15, 'UsrPhone' => 16, 'UsrFax' => 17, 'UsrCellular' => 18, 'UsrZipCode' => 19, 'DepUid' => 20, 'UsrPosition' => 21, 'UsrResume' => 22, 'UsrBirthday' => 23, 'UsrRole' => 24, 'UsrReportsTo' => 25, 'UsrReplacedBy' => 26, 'UsrUx' => 27, 'UsrCostByHour' => 28, 'UsrUnitCost' => 29, 'UsrPmdriveFolderUid' => 30, 'UsrBookmarkStartCases' => 31, 'UsrTimeZone' => 32, 'UsrDefaultLang' => 33, 'UsrLastLogin' => 34, 'UsrExtendedAttributesData' => 35, ), + BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID => 0, UsersPeer::USR_ID => 1, UsersPeer::USR_USERNAME => 2, UsersPeer::USR_PASSWORD => 3, UsersPeer::USR_FIRSTNAME => 4, UsersPeer::USR_LASTNAME => 5, UsersPeer::USR_EMAIL => 6, UsersPeer::USR_DUE_DATE => 7, UsersPeer::USR_CREATE_DATE => 8, UsersPeer::USR_UPDATE_DATE => 9, UsersPeer::USR_STATUS => 10, UsersPeer::USR_STATUS_ID => 11, UsersPeer::USR_COUNTRY => 12, UsersPeer::USR_CITY => 13, UsersPeer::USR_LOCATION => 14, UsersPeer::USR_ADDRESS => 15, UsersPeer::USR_PHONE => 16, UsersPeer::USR_FAX => 17, UsersPeer::USR_CELLULAR => 18, UsersPeer::USR_ZIP_CODE => 19, UsersPeer::DEP_UID => 20, UsersPeer::USR_POSITION => 21, UsersPeer::USR_RESUME => 22, UsersPeer::USR_BIRTHDAY => 23, UsersPeer::USR_ROLE => 24, UsersPeer::USR_REPORTS_TO => 25, UsersPeer::USR_REPLACED_BY => 26, UsersPeer::USR_UX => 27, UsersPeer::USR_COST_BY_HOUR => 28, UsersPeer::USR_UNIT_COST => 29, UsersPeer::USR_PMDRIVE_FOLDER_UID => 30, UsersPeer::USR_BOOKMARK_START_CASES => 31, UsersPeer::USR_TIME_ZONE => 32, UsersPeer::USR_DEFAULT_LANG => 33, UsersPeer::USR_LAST_LOGIN => 34, UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA => 35, ), + BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_ID' => 1, 'USR_USERNAME' => 2, 'USR_PASSWORD' => 3, 'USR_FIRSTNAME' => 4, 'USR_LASTNAME' => 5, 'USR_EMAIL' => 6, 'USR_DUE_DATE' => 7, 'USR_CREATE_DATE' => 8, 'USR_UPDATE_DATE' => 9, 'USR_STATUS' => 10, 'USR_STATUS_ID' => 11, 'USR_COUNTRY' => 12, 'USR_CITY' => 13, 'USR_LOCATION' => 14, 'USR_ADDRESS' => 15, 'USR_PHONE' => 16, 'USR_FAX' => 17, 'USR_CELLULAR' => 18, 'USR_ZIP_CODE' => 19, 'DEP_UID' => 20, 'USR_POSITION' => 21, 'USR_RESUME' => 22, 'USR_BIRTHDAY' => 23, 'USR_ROLE' => 24, 'USR_REPORTS_TO' => 25, 'USR_REPLACED_BY' => 26, 'USR_UX' => 27, 'USR_COST_BY_HOUR' => 28, 'USR_UNIT_COST' => 29, 'USR_PMDRIVE_FOLDER_UID' => 30, 'USR_BOOKMARK_START_CASES' => 31, 'USR_TIME_ZONE' => 32, 'USR_DEFAULT_LANG' => 33, 'USR_LAST_LOGIN' => 34, 'USR_EXTENDED_ATTRIBUTES_DATA' => 35, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ) ); /** @@ -334,6 +337,8 @@ abstract class BaseUsersPeer $criteria->addSelectColumn(UsersPeer::USR_LAST_LOGIN); + $criteria->addSelectColumn(UsersPeer::USR_EXTENDED_ATTRIBUTES_DATA); + } const COUNT = 'COUNT(USERS.USR_UID)'; diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 2ac795b18..4a2244101 100755 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -1783,6 +1783,7 @@ + @@ -6068,4 +6069,20 @@ + + + + + + + + + + + + + + + +
diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index 3bb8f8c75..bbdcf15b9 100755 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -2611,6 +2611,12 @@ msgstr "Attach file" msgid "Attached files" msgstr "Attached files" +# TRANSLATION +# LABEL/ID_ATTRIBUTE +#: LABEL/ID_ATTRIBUTE +msgid "Attribute" +msgstr "Attribute" + # TRANSLATION # LABEL/ID_ATTRIBUTES #: LABEL/ID_ATTRIBUTES @@ -2623,6 +2629,36 @@ msgstr "Attributes" msgid "The attribute {0}, has an invalid element (incorrect keys)." msgstr "The attribute {0}, has an invalid element (incorrect keys)." +# TRANSLATION +# LABEL/ID_ATTRIBUTE_ID +#: LABEL/ID_ATTRIBUTE_ID +msgid "Attribute ID" +msgstr "Attribute ID" + +# TRANSLATION +# LABEL/ID_ATTRIBUTE_NAME +#: LABEL/ID_ATTRIBUTE_NAME +msgid "Attribute Name" +msgstr "Attribute Name" + +# TRANSLATION +# LABEL/ID_ATTRIBUTE_WILL_BE_HIDDEN_USING_PLACEHOLDER +#: LABEL/ID_ATTRIBUTE_WILL_BE_HIDDEN_USING_PLACEHOLDER +msgid "The new attribute value will be hidden using * placeholder instead of real value." +msgstr "The new attribute value will be hidden using * placeholder instead of real value." + +# TRANSLATION +# LABEL/ID_ATTRIBUTE_WILL_BE_REQUIRED_WHEN_EDITING_USER_SETTINGS +#: LABEL/ID_ATTRIBUTE_WILL_BE_REQUIRED_WHEN_EDITING_USER_SETTINGS +msgid "The new attribute will be required when editing user settings." +msgstr "The new attribute will be required when editing user settings." + +# TRANSLATION +# LABEL/ID_ATTRIBUTE_WONT_BE_SEEN_IN_USER_INFORMATION +#: LABEL/ID_ATTRIBUTE_WONT_BE_SEEN_IN_USER_INFORMATION +msgid "The new attribute won't be seen in the user information pages." +msgstr "The new attribute won't be seen in the user information pages." + # TRANSLATION # LABEL/ID_AT_RISK #: LABEL/ID_AT_RISK @@ -2993,6 +3029,12 @@ msgstr "Button" msgid "Buy now" msgstr "Buy now" +# TRANSLATION +# LABEL/ID_BY_ROLE +#: LABEL/ID_BY_ROLE +msgid "By Role" +msgstr "By Role" + # TRANSLATION # LABEL/ID_CACHE_BTN_BUILD #: LABEL/ID_CACHE_BTN_BUILD @@ -4295,6 +4337,12 @@ msgstr "Choose an option" msgid "Please select provider" msgstr "Please select provider" +# TRANSLATION +# LABEL/ID_CITY +#: LABEL/ID_CITY +msgid "City" +msgstr "City" + # TRANSLATION # LABEL/ID_CLAIM #: LABEL/ID_CLAIM @@ -8159,6 +8207,12 @@ msgstr "Export Skin" msgid "Export Table" msgstr "Export Table" +# TRANSLATION +# LABEL/ID_EXTENDED_ATTRIBUTES +#: LABEL/ID_EXTENDED_ATTRIBUTES +msgid "Extended Attributes" +msgstr "Extended Attributes" + # TRANSLATION # LABEL/ID_EXTENDED_FEATURES #: LABEL/ID_EXTENDED_FEATURES @@ -9455,6 +9509,12 @@ msgstr "Heart beat has been enabled" msgid "Help" msgstr "Help" +# TRANSLATION +# LABEL/ID_HIDDEN +#: LABEL/ID_HIDDEN +msgid "Hidden" +msgstr "Hidden" + # TRANSLATION # LABEL/ID_HIDE #: LABEL/ID_HIDE @@ -19667,6 +19727,12 @@ msgstr "New" msgid "New PM Table" msgstr "New PM Table" +# TRANSLATION +# LABEL/ID_NEW_ATTRIBUTE +#: LABEL/ID_NEW_ATTRIBUTE +msgid "New Attribute" +msgstr "New Attribute" + # TRANSLATION # LABEL/ID_NEW_AUTHENTICATION_SOURCES #: LABEL/ID_NEW_AUTHENTICATION_SOURCES @@ -19853,6 +19919,12 @@ msgstr "New Translation" msgid "[LABEL/ID_NEW_TRIGGERS] New Trigger" msgstr "New Trigger" +# TRANSLATION +# LABEL/ID_NEW_USER_ATTRIBUTE +#: LABEL/ID_NEW_USER_ATTRIBUTE +msgid "New User Attribute" +msgstr "New User Attribute" + # TRANSLATION # LABEL/ID_NEW_VERSION #: LABEL/ID_NEW_VERSION @@ -23189,6 +23261,12 @@ msgstr "Request sent." msgid "Require sign-in policy for LDAP" msgstr "Require sign-in policy for LDAP" +# TRANSLATION +# LABEL/ID_REQUIRED +#: LABEL/ID_REQUIRED +msgid "Required" +msgstr "Required" + # TRANSLATION # LABEL/ID_REQUIRED_FIELD #: LABEL/ID_REQUIRED_FIELD @@ -25583,6 +25661,12 @@ msgstr "There was a problem sending the email to" msgid "Error: The application {0} is not canceled." msgstr "Error: The application {0} is not canceled." +# TRANSLATION +# LABEL/ID_THE_ATTRIBUTE_WILL_BE_DELETED_PLEASE_CONFIRM +#: LABEL/ID_THE_ATTRIBUTE_WILL_BE_DELETED_PLEASE_CONFIRM +msgid "The attribute {0} will be deleted, please confirm." +msgstr "The attribute {0} will be deleted, please confirm." + # TRANSLATION # LABEL/ID_THE_DEFAULT_CONFIGURATION #: LABEL/ID_THE_DEFAULT_CONFIGURATION @@ -25643,6 +25727,12 @@ msgstr "The report table is regenerating please come back in a few minutes." msgid "The upload of PHP files was disabled please contact the system administrator." msgstr "The upload of PHP files was disabled please contact the system administrator." +# TRANSLATION +# LABEL/ID_THE_USER_ROLES_FOR_ATTRIBUTE_HAS_BEEN_DELETED_PLEASE_CONFIRM +#: LABEL/ID_THE_USER_ROLES_FOR_ATTRIBUTE_HAS_BEEN_DELETED_PLEASE_CONFIRM +msgid "The user roles for attribute {0} has been modified, if you proceed to save this attribute, all information for users stored in the attribute will be deleted for the removed role, please confirm." +msgstr "The user roles for attribute {0} has been modified, if you proceed to save this attribute, all information for users stored in the attribute will be deleted for the removed role, please confirm." + # TRANSLATION # LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT #: LABEL/ID_THE_USERNAME_EMAIL_IS_INCORRECT @@ -26231,6 +26321,12 @@ msgstr "Tue" msgid "[LABEL/ID_TYPE] Type" msgstr "Type" +# TRANSLATION +# LABEL/ID_TYPE_PASSWORD +#: LABEL/ID_TYPE_PASSWORD +msgid "Type Password" +msgstr "Type Password" + # TRANSLATION # LABEL/ID_TYPE_PROCESS #: LABEL/ID_TYPE_PROCESS @@ -27071,6 +27167,12 @@ msgstr "The user \"{0}\" does not have the activity \"{1}\" assigned." msgid "User Experience" msgstr "User Experience" +# TRANSLATION +# LABEL/ID_USER_EXTENDED_ATTRIBUTES +#: LABEL/ID_USER_EXTENDED_ATTRIBUTES +msgid "User Extended Attributes" +msgstr "User Extended Attributes" + # TRANSLATION # LABEL/ID_USER_FIELD #: LABEL/ID_USER_FIELD diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 0e901eb03..e1c8038c5 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -57240,8 +57240,14 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_ATTACHED_DB','en','Attached','2014-10-08') , ( 'LABEL','ID_ATTACH_FILE','en','Attach file','2020-06-11') , ( 'LABEL','ID_ATTACHED_FILES','en','Attached files','2020-06-10') , +( 'LABEL','ID_ATTRIBUTE','en','Attribute','2020-12-15') , ( 'LABEL','ID_ATTRIBUTES','en','Attributes','2014-01-15') , ( 'LABEL','ID_ATTRIBUTE_HAS_INVALID_ELEMENT_KEY','en','The attribute {0}, has an invalid element (incorrect keys).','2014-05-20') , +( 'LABEL','ID_ATTRIBUTE_ID','en','Attribute ID','2020-12-15') , +( 'LABEL','ID_ATTRIBUTE_NAME','en','Attribute Name','2020-12-15') , +( 'LABEL','ID_ATTRIBUTE_WILL_BE_HIDDEN_USING_PLACEHOLDER','en','The new attribute value will be hidden using * placeholder instead of real value.','2020-12-15') , +( 'LABEL','ID_ATTRIBUTE_WILL_BE_REQUIRED_WHEN_EDITING_USER_SETTINGS','en','The new attribute will be required when editing user settings.','2020-12-15') , +( 'LABEL','ID_ATTRIBUTE_WONT_BE_SEEN_IN_USER_INFORMATION','en','The new attribute won''t be seen in the user information pages.','2020-12-15') , ( 'LABEL','ID_AT_RISK','en','At Risk','2014-01-15') , ( 'LABEL','ID_AT_TILL','en','at ${0} Till ${1}','2014-01-15') , ( 'LABEL','ID_AUDITLOG_DISPLAY','en','Audit Log','2014-09-19') , @@ -57306,6 +57312,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_BUILD_CACHE','en','Build Cache','2014-10-10') , ( 'LABEL','ID_BUTTON','en','Button','2014-01-15') , ( 'LABEL','ID_BUY_NOW','en','Buy now','2014-09-18') , +( 'LABEL','ID_BY_ROLE','en','By Role','2020-12-15') , ( 'LABEL','ID_CACHE_BTN_BUILD','en','Build Cache','2014-01-15') , ( 'LABEL','ID_CACHE_BTN_SETUP_PASSWRD','en','Setup Password','2014-01-15') , ( 'LABEL','ID_CACHE_BTN_SETUP_SESSION','en','Delete older session files','2014-01-15') , @@ -57527,6 +57534,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_CHOOSE_A_FILE_OR_DROP_IT_HERE','en','Choose a file or drop it here...','2020-12-10') , ( 'LABEL','ID_CHOOSE_OPTION','en','Choose an option','2014-01-15') , ( 'LABEL','ID_CHOOSE_PROVIDER','en','Please select provider','2014-08-27') , +( 'LABEL','ID_CITY','en','City','2020-12-15') , ( 'LABEL','ID_CHOOSE_TIME','en','Choose a time','2014-08-27') , ( 'LABEL','ID_CLAIM','en','Claim','2014-01-15') , ( 'LABEL','ID_CLASSIC_EDITOR','en','Classic Editor','2014-01-15') , @@ -58200,6 +58208,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_EXPORT_PROCESS_OBJECTS','en','Export Process Objects','2016-03-30') , ( 'LABEL','ID_EXPORT_SKIN','en','Export Skin','2014-10-10') , ( 'LABEL','ID_EXPORT_TABLE','en','Export Table','2014-10-10') , +( 'LABEL','ID_EXTENDED_ATTRIBUTES','en','Extended Attributes','2020-12-15') , ( 'LABEL','ID_EXTENDED_FEATURES','en','Extended Features','2014-01-15') , ( 'LABEL','ID_EXTERNAL_FILE','en','External','2014-01-15') , ( 'LABEL','ID_EXTERNAL_REGISTRATION','en','External Registration','2016-07-01') , @@ -58422,6 +58431,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_HEART_BEAT_DISABLED','en','Heart beat has been disabled','2014-01-15') , ( 'LABEL','ID_HEART_BEAT_ENABLED','en','Heart beat has been enabled','2014-01-15') , ( 'LABEL','ID_HELP','en','Help','2015-04-06') , +( 'LABEL','ID_HIDDEN','en','Hidden','2020-12-15') , ( 'LABEL','ID_HIDE','en','Hide','2014-01-15') , ( 'LABEL','ID_HIDE_DIRS','en','Hide Dirs','2014-05-26') , ( 'LABEL','ID_HIDE_PROCESS_INF','en','Hide Process Information','2014-01-15') , @@ -60165,6 +60175,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_NEED_REGISTER','en','You need to be registered to download this process. Register NOW!','2014-01-15') , ( 'LABEL','ID_NEW','en','New','2014-01-15') , ( 'LABEL','ID_NEW_ADD_TABLE','en','New PM Table','2014-01-15') , +( 'LABEL','ID_NEW_ATTRIBUTE','en','New Attribute','2020-12-15') , ( 'LABEL','ID_NEW_AUTHENTICATION_SOURCES','en','New Authentication Sources','2020-12-10') , ( 'LABEL','ID_NEW_BPMN_PROJECT','en','New BPMN Project','2015-08-18') , ( 'LABEL','ID_NEW_CASE','en','New case','2014-01-15') , @@ -60196,6 +60207,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_NEW_TAB_INDICATOR','en','Add Indicator','2015-03-09') , ( 'LABEL','ID_NEW_TRANSLATION','en','New Translation','2014-01-15') , ( 'LABEL','ID_NEW_TRIGGERS','en','New Trigger','2014-01-15') , +( 'LABEL','ID_NEW_USER_ATTRIBUTE','en','New User Attribute','2020-12-15') , ( 'LABEL','ID_NEW_VERSION','en','New Version','2014-01-15') , ( 'LABEL','ID_NEW_WEB_ENTRY','en','New Web Entry','2014-01-15') , ( 'LABEL','ID_NEW_WORKSPACE','en','New Workspace','2014-01-15') , @@ -60769,6 +60781,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_REQUEST_DOCUMENTS','en','Input Documents','2014-01-15') , ( 'LABEL','ID_REQUEST_SENT','en','Request sent.','2014-01-15') , ( 'LABEL','ID_REQUIRE_SIGN_IN_POLICY_FOR_LDAP','en','Require sign-in policy for LDAP','2020-12-10') , +( 'LABEL','ID_REQUIRED','en','Required','2020-12-15') , ( 'LABEL','ID_REQUIRED_FIELD','en','Required Field','2014-01-15') , ( 'LABEL','ID_REQUIRED_FIELDS_ERROR','en','Some required fields were not filled','2014-01-15') , ( 'LABEL','ID_REQUIRED_FIELDS_GRID','en','The marked fields in the form are required and/or have errors in their format. Please verify the fields before continuing.','2015-05-04') , @@ -61213,6 +61226,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_THERE_MUST__LEAST_HOLIDAY','en','There must be at least a holiday','2014-01-15') , ( 'LABEL','ID_THERE_PROBLEM_SENDING_EMAIL','en','There was a problem sending the email to','2016-04-08') , ( 'LABEL','ID_THE_APPLICATION_IS_NOT_CANCELED','en','Error: The application {0} is not canceled.','2016-06-15') , +( 'LABEL','ID_THE_ATTRIBUTE_WILL_BE_DELETED_PLEASE_CONFIRM','en','The attribute {0} will be deleted, please confirm.','2020-12-15') , ( 'LABEL','ID_THE_DEFAULT_CONFIGURATION','en','The default configuration was not defined','2016-11-16') , ( 'LABEL','ID_THE_FILE_COULDNT_BE_UPLOADED','en','The file couldn’t be uploaded please review the allowed files or contact your System Administrator.','2020-06-12') , ( 'LABEL','ID_THE_FILE_SIZE_IS_BIGGER_THAN_THE_MAXIMUM_ALLOWED','en','The file size is bigger than the maximum allowed, the maximum size allowed is {0} Mbytes.','2019-02-26') , @@ -61223,6 +61237,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_THE_REASON_REASSIGN_USER_EMPTY','en','Please complete the reassign reason.','2016-10-20') , ( 'LABEL','ID_THE_REPORT_TABLE_IS_REGENERATING_PLEASE_COME_BACK_IN_A_FEW_MINUTES','en','The report table is regenerating please come back in a few minutes.','2020-06-01') , ( 'LABEL','ID_THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED','en','The upload of PHP files was disabled please contact the system administrator.','2018-04-20') , +( 'LABEL','ID_THE_USER_ROLES_FOR_ATTRIBUTE_HAS_BEEN_DELETED_PLEASE_CONFIRM','en','The user roles for attribute {0} has been modified, if you proceed to save this attribute, all information for users stored in the attribute will be deleted for the removed role, please confirm.','2020-12-15') , ( 'LABEL','ID_THE_USERNAME_EMAIL_IS_INCORRECT','en','The username or email is incorrect','2018-01-18') , ( 'LABEL','ID_THIS_MONTH','en','This Month','2014-01-15') , ( 'LABEL','ID_THIS_QUARTER','en','This quarter','2014-01-15') , @@ -61322,6 +61337,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_TRUE','en','TRUE','2014-01-15') , ( 'LABEL','ID_TUE','en','Tue','2014-01-15') , ( 'LABEL','ID_TYPE','en','Type','2014-01-15') , +( 'LABEL','ID_TYPE_PASSWORD','en','Type Password','2020-12-15') , ( 'LABEL','ID_TYPE_PROCESS','en','Process Type','2014-10-22') , ( 'LABEL','ID_TWICE_PER_DAY','en','Twice per day','2014-10-22') , ( 'LABEL','ID_UID','en','UID','2014-01-15') , @@ -61467,6 +61483,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_USER_DOES_NOT_EXIST','en','The User with {0}: {1} does not exist.','2015-03-23') , ( 'LABEL','ID_USER_DOES_NOT_HAVE_ACTIVITY_ASSIGNED','en','The user "{0}" does not have the activity "{1}" assigned.','2014-05-20') , ( 'LABEL','ID_USER_EXPERIENCE','en','User Experience','2014-01-15') , +( 'LABEL','ID_USER_EXTENDED_ATTRIBUTES','en','User Extended Attributes','2020-12-15') , ( 'LABEL','ID_USER_FIELD','en','User Field','2015-09-15') , ( 'LABEL','ID_USER_GROUPS','en','Groups for','2014-01-15') , ( 'LABEL','ID_USER_GROUPS_ADHOC','en','Users and User Groups(Ad Hoc)','2014-01-15') , diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql index 2a24093db..a3fb9a133 100644 --- a/workflow/engine/data/mysql/schema.sql +++ b/workflow/engine/data/mysql/schema.sql @@ -841,6 +841,7 @@ CREATE TABLE `USERS` `USR_TIME_ZONE` VARCHAR(100) default '', `USR_DEFAULT_LANG` VARCHAR(10) default '', `USR_LAST_LOGIN` DATETIME, + `USR_EXTENDED_ATTRIBUTES_DATA` MEDIUMTEXT, PRIMARY KEY (`USR_UID`), UNIQUE KEY `INDEX_USR_ID` (`USR_ID`), KEY `indexUsrStatus`(`USR_STATUS`), @@ -3359,5 +3360,26 @@ CREATE TABLE `SCHEDULER` `last_update` DATETIME, PRIMARY KEY (`id`) )ENGINE=InnoDB DEFAULT CHARSET='utf8'; +#----------------------------------------------------------------------------- +#-- USER_EXTENDED_ATTRIBUTES +#----------------------------------------------------------------------------- + +DROP TABLE IF EXISTS `USER_EXTENDED_ATTRIBUTES`; + + +CREATE TABLE `USER_EXTENDED_ATTRIBUTES` +( + `UEA_ID` BIGINT(20) NOT NULL AUTO_INCREMENT, + `UEA_NAME` VARCHAR(255), + `UEA_ATTRIBUTE_ID` VARCHAR(255), + `UEA_HIDDEN` INTEGER, + `UEA_REQUIRED` INTEGER, + `UEA_PASSWORD` INTEGER, + `UEA_OPTION` VARCHAR(255), + `UEA_ROLES` MEDIUMTEXT, + `UEA_OWNER` BIGINT(20), + `UEA_DATE_CREATE` DATETIME, + PRIMARY KEY (`UEA_ID`) +)ENGINE=InnoDB DEFAULT CHARSET='utf8'; # This restores the fkey checks, after having unset them earlier SET FOREIGN_KEY_CHECKS = 1; diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index e8f4e5ecc..cc6d1d854 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -204,6 +204,14 @@ if ($RBAC->userCanAccess('PM_USERS') === 1) { '', 'users' ); + $G_TMP_MENU->AddIdRawOption( + 'USERS_EXTENDED', + '../userExtendedAttributes/index', + G::LoadTranslation('ID_USER_EXTENDED_ATTRIBUTES'), + 'icon-webservices.png', + '', + 'users' + ); $G_TMP_MENU->AddIdRawOption( 'GROUPS', '../groups/groups', diff --git a/workflow/engine/methods/authenticationSources/index.php b/workflow/engine/methods/authenticationSources/index.php index a26481dc2..305ea013a 100644 --- a/workflow/engine/methods/authenticationSources/index.php +++ b/workflow/engine/methods/authenticationSources/index.php @@ -3,7 +3,15 @@ global $G_PUBLISH; $G_PUBLISH = new Publisher(); try { - echo file_get_contents(PATH_HOME . "public_html/lib/authenticationSources/index.html"); + $conf = new Configurations(); + $pageSize = $conf->getEnvSetting('casesListRowNumber'); + $pageSize = empty($pageSize) ? 25 : $pageSize; + $lang = defined("SYS_LANG") ? SYS_LANG : "en"; + + $html = file_get_contents(PATH_HTML . "lib/authenticationSources/index.html"); + $html = str_replace("var pageSize=10;", "var pageSize={$pageSize};", $html); + $html = str_replace("translation.en.js", "translation.{$lang}.js", $html); + echo $html; } catch (Exception $e) { $message = [ 'MESSAGE' => $e->getMessage() diff --git a/workflow/engine/methods/authenticationSources/public/index.html b/workflow/engine/methods/authenticationSources/public/index.html index 7379cee50..f1ff5137d 100644 --- a/workflow/engine/methods/authenticationSources/public/index.html +++ b/workflow/engine/methods/authenticationSources/public/index.html @@ -6,7 +6,11 @@ <%= htmlWebpackPlugin.options.title %> + +