18 require_once SQ_INCLUDE_PATH.
'/asset.inc';
19 require_once SQ_INCLUDE_PATH.
'/general_occasional.inc';
20 require_once SQ_INCLUDE_PATH.
'/password_rules_config.inc';
48 $this->_ser_attrs = TRUE;
49 $this->
Asset($assetid);
66 if (!parent::_preCreateCheck($link))
return FALSE;
68 if(SQ_CONF_FORCE_LOWERCASE_USERNAME && in_array(get_class($this), Array(
'User',
'Simple_Edit_User',
'Backend_User',
'System_User')))
71 $username = trim($this->
attr(
'username'));
72 $password = $this->
attr(
'password');
75 if (!array_get_index($this->_tmp,
'username_set') || !array_get_index($this->_tmp,
'password_set')) {
78 trigger_localised_error(
'CORE0084', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
100 if (!parent::_createAdditional($link))
return FALSE;
103 trigger_localised_error(
'CORE0019', E_USER_WARNING, $this->name);
108 $GLOBALS[
'SQ_SYSTEM']->setRunLevel(SQ_RUN_LEVEL_FORCED);
111 if (!$GLOBALS[
'SQ_SYSTEM']->am->setPermission($this->id, $this->id, SQ_PERMISSION_ADMIN, TRUE)) {
112 trigger_localised_error(
'CORE0015', E_USER_WARNING, $this->name);
113 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
118 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
120 $user_link = Array(
'asset' => &$this,
'link_type' => SQ_LINK_TYPE_2,
'is_dependant' => 1,
'is_exclusive' => 1);
123 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'inbox');
124 $inbox =
new Inbox();
125 if (!$inbox->create($user_link))
return FALSE;
128 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset(
'workspace');
130 $workspace->setAttrValue(
'name',
'Workspace');
131 if (!$workspace->create($user_link))
return FALSE;
147 unset($_SESSION[
'sq_user_groups'][$this->
id]);
161 $allowed = parent::_getAllowedLinks();
163 $allowed[SQ_LINK_TYPE_1][
'asset'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
164 $allowed[SQ_LINK_TYPE_2][
'asset'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
165 $allowed[SQ_LINK_TYPE_3][
'asset'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
166 $allowed[SQ_LINK_NOTICE][
'asset'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
169 $allowed[SQ_LINK_TYPE_2][
'inbox'] = Array(
'card' => 1,
'exclusive' => TRUE);
170 $allowed[SQ_LINK_TYPE_2][
'workspace'] = Array(
'card' => 1,
'exclusive' => TRUE);
191 if ($name ==
'password') {
192 $this->_tmp[
'password_set'] = TRUE;
193 if ($GLOBALS[
'SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_PASSWORD_VALIDATION)) {
197 $value = $GLOBALS[
'SQ_REVERT_TO_SYSTEM_VERSION'] ? $value : crypt($value);
198 }
else if ($name ==
'username') {
199 $this->_tmp[
'username_set'] = TRUE;
201 trigger_localised_error(
'CORE0110', E_USER_WARNING);
205 if(SQ_CONF_FORCE_LOWERCASE_USERNAME && in_array(get_class($this), Array(
'User',
'Simple_Edit_User',
'Backend_User',
'System_User')))
206 $value = strtolower($value);
209 if (!parent::setAttrValue($name, $value))
return FALSE;
212 if ($name ==
'username') {
213 $em = $GLOBALS[
'SQ_SYSTEM']->getEventManager();
214 $em->broadcastEvent($this,
'usernameUpdated', Array(
'username' => $value));
233 $root_user = $GLOBALS[
'SQ_SYSTEM']->am->getSystemAssetid(
'root_user');
236 if ($this->
id != $root_user && strpos($this->
id,
':') === FALSE) {
238 switch ($new_status) {
239 case SQ_STATUS_UNDER_CONSTRUCTION:
241 if ($this->status == SQ_STATUS_ARCHIVED) {
243 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
245 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
249 $sql =
'SELECT oa.attrid as owning_attrid, a.attrid as attrid FROM sq_ast_attr a INNER JOIN sq_ast_attr oa ON (a.owning_type_code = oa.type_code AND a.name = oa.name) WHERE a.name = :name AND a.type_code = :type_code';
254 }
catch (Exception $e) {
255 throw new Exception(
'Cannot check for attribute value "'.$this->name.
'" of type code "'.$this->type().
'" due to database error: '.$e->getMessage());
260 $owning_attributeid = $attributes[0][
'owning_attrid'];
261 $attributeid = $attributes[0][
'attrid'];
265 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
266 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
274 if ($name != $this->
attr(
'username')) {
275 $GLOBALS[
'SQ_SYSTEM']->setRunLevel(SQ_RUN_LEVEL_FORCED);
278 $GLOBALS[
'SQ_SYSTEM']->restoreRunLevel();
283 $prepared =
MatrixDAL::preparePdoQuery(
'INSERT INTO sq_ast_attr_uniq_val (custom_val, owning_attrid, assetid) VALUES (:custom_val, :owning_attrid, :assetid)');
288 }
catch (Exception $e) {
289 throw new Exception(
'Unable to add the unique attribute value for asset "'.$this->name.
'" (#'.$this->id.
') due to database error: '.$e->getMessage());
290 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
291 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
296 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
297 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
300 case SQ_STATUS_ARCHIVED:
301 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
303 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
309 }
catch (Exception $e) {
310 throw new Exception(
'Unable to delete unique attribute value for asset "'.$this->name.
'" (#'.$this->id.
') due to database error: '.$e->getMessage());
311 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
312 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
315 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
316 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
321 return parent::processStatusChange($new_status, $update_parents);
336 $password = $this->
attr(
'password');
338 if (!trim($password))
return FALSE;
340 return (crypt($entered_password,$password) == $password);
356 $valid_username = $current_username;
358 while (!$found_one) {
359 $current_values = Array();
361 $prepared =
MatrixDAL::preparePdoQuery(
'SELECT custom_val FROM sq_ast_attr_uniq_val WHERE owning_attrid=:owning_attrid AND custom_val LIKE :custom_val');
365 }
catch (Exception $e) {
366 throw new Exception(
'Unable to open database due to database error: '.$e->getMessage());
370 if (empty($current_values)) {
373 require_once SQ_FUDGE_PATH.
'/general/file_system.inc';
374 $valid_username = increment_filename($valid_username);
378 return $valid_username;
395 require_once $config->config_file;
398 if ($passwd ===
'') {
399 if ($add_system_message) {
400 $GLOBALS[
'SQ_SYSTEM']->addMessage($$GLOBALS[
'SQ_SYSTEM']->getErrorMessage(
'CORE0247'));
402 trigger_localised_error(
'CORE0247', E_USER_NOTICE);
404 $this->_tmp[
'password_validation_error'] = TRUE;
411 $not_occurring_error_map = Array(
412 'SQ_PASSWD_RULE_NUM_CAPS' =>
'CORE0222',
413 'SQ_PASSWD_RULE_NUM_LOWER' =>
'CORE0223',
414 'SQ_PASSWD_RULE_NUM_INT' =>
'CORE0224',
415 'SQ_PASSWD_RULE_NUM_PUNC' =>
'CORE0225',
416 'SQ_PASSWD_RULE_NUM_SPC' =>
'CORE0226',
420 $occurring_error_map = Array(
421 'SQ_PASSWD_RULE_NUM_CAPS' =>
'CORE0227',
422 'SQ_PASSWD_RULE_NUM_LOWER' =>
'CORE0228',
423 'SQ_PASSWD_RULE_NUM_INT' =>
'CORE0229',
424 'SQ_PASSWD_RULE_NUM_PUNC' =>
'CORE0230',
425 'SQ_PASSWD_RULE_NUM_SPC' =>
'CORE0231',
428 if (defined(
'SQ_PASSWD_RULE_LENGTH') && SQ_PASSWD_RULE_LENGTH > -1) {
429 if (strlen($passwd) < SQ_PASSWD_RULE_LENGTH) {
430 $errors[] = Array(
'CORE0220', strlen($passwd), SQ_PASSWD_RULE_LENGTH);
434 if (defined(
'SQ_PASSWD_RULE_DISALLOW_USER_INFO') && SQ_PASSWD_RULE_DISALLOW_USER_INFO == 0) {
435 $components = Array(
'username',
'first_name',
'last_name',
'email');
436 foreach ($components as $component) {
437 $attr = $this->
attr($component);
438 if (!empty($attr) && preg_match(
'/.*'.$this->
attr($component).
'.*/i', $passwd)) {
439 $errors[] = Array(
'CORE0221');
445 $charlist = count_chars($passwd, 1);
446 $num_rules = get_constant_values(
'SQ_PASSWD_RULE_NUM_');
448 foreach ($num_rules as $rule => $value) {
449 eval(
'$'.$rule.
'_counter = 0;');
450 if ($value != SQ_PASSWD_RULE_DISABLED) {
451 foreach ($charlist as $char => $occurances) {
453 case 'SQ_PASSWD_RULE_NUM_CAPS':
454 if (ctype_upper($char)) {
455 eval(
'$'.$rule.
'_counter += $occurances;');
459 case 'SQ_PASSWD_RULE_NUM_LOWER':
460 if (ctype_lower($char)) {
461 eval(
'$'.$rule.
'_counter += $occurances;');
465 case 'SQ_PASSWD_RULE_NUM_INT':
466 if (ctype_digit($char)) {
467 eval(
'$'.$rule.
'_counter += $occurances;');
471 case 'SQ_PASSWD_RULE_NUM_PUNC':
472 if (ctype_punct($char)) {
473 eval(
'$'.$rule.
'_counter += $occurances;');
477 case 'SQ_PASSWD_RULE_NUM_SPC':
478 if (ctype_space($char)) {
479 eval(
'$'.$rule.
'_counter += $occurances;');
487 foreach ($num_rules as $rule => $value) {
488 if ($value != SQ_PASSWD_RULE_DISABLED) {
489 eval(
'$tmp_counter = $'.$rule.
'_counter;');
490 if ($value == SQ_PASSWD_RULE_DISALLOWED && $tmp_counter > 0) {
491 if (isset($occurring_error_map[$rule])) {
492 $errors[] = Array($occurring_error_map[$rule]);
494 }
else if ($tmp_counter < $value) {
495 if (isset($not_occurring_error_map[$rule])) {
496 $errors[] = Array($not_occurring_error_map[$rule], $tmp_counter, $value);
503 $blacklist = SQ_PASSWD_RULE_BLACK_LIST;
504 if (!empty($blacklist)) {
505 $blacklist = str_replace(
"\r\n",
"\n", $blacklist);
506 $blacklist = str_replace(
"\r",
"\n", $blacklist);
507 $blacklist = explode(
"\n", $blacklist);
508 foreach ($blacklist as $word) {
509 if ((!SQ_PASSWD_RULE_BLACK_LIST_EXACT && preg_match(
'/'.$word.
'/', $passwd)) || (SQ_PASSWD_RULE_BLACK_LIST_EXACT && (strcmp($passwd, $word) == 0))) {
510 $errors[] = Array(
'CORE0260');
515 if ($add_system_message) {
517 foreach ($errors as $error) {
518 $code = array_shift($error);
519 $bit = $GLOBALS[
'SQ_SYSTEM']->lm->getErrorMessage($code, $error);
520 $bit = preg_replace(
'/\[([^\]]*)\]$/',
'', $bit);
521 $msgs .=
'<li>'.$bit.
'</li>';
523 if (!empty($errors)) {
524 $GLOBALS[
'SQ_SYSTEM']->addMessage(translate(
'password_validation_error',
'<ul>'.$msgs.
'</ul>'));
527 foreach ($errors as $error) {
528 $code = array_shift($error);
529 $GLOBALS[
'SQ_SYSTEM']->lm->raiseError($code, E_USER_WARNING, $error);
533 return empty($errors);
546 include_once SQ_DATA_PATH.
'/private/conf/password_rules.inc';
548 if (SQ_PASSWD_RULE_LENGTH > 0) {
549 $res[] = translate(
'password_rules_min_length', SQ_PASSWD_RULE_LENGTH);
551 if (SQ_PASSWD_RULE_DISALLOW_USER_INFO == 0) {
553 $res[] = translate(
'password_rules_user_info_prohibited');
556 if (SQ_PASSWD_RULE_NUM_CAPS > 1) {
557 $res[] = translate(
'password_rules_at_least', SQ_PASSWD_RULE_NUM_CAPS, translate(
'capital_letters'));
559 if (SQ_PASSWD_RULE_NUM_LOWER > 1) {
560 $res[] = translate(
'password_rules_at_least', SQ_PASSWD_RULE_NUM_LOWER, translate(
'lowercase_letters'));
562 if (SQ_PASSWD_RULE_NUM_INT > 1) {
563 $res[] = translate(
'password_rules_at_least', SQ_PASSWD_RULE_NUM_INT, translate(
'numeric_digits'));
565 if (SQ_PASSWD_RULE_NUM_PUNC > 1) {
566 $res[] = translate(
'password_rules_at_least', SQ_PASSWD_RULE_NUM_PUNC, translate(
'punctuation_characters'));
568 if (SQ_PASSWD_RULE_NUM_SPC > 1) {
569 $res[] = translate(
'password_rules_at_least', SQ_PASSWD_RULE_NUM_SPC, translate(
'spaces'));
572 if (SQ_PASSWD_RULE_NUM_CAPS == 1) {
573 $res[] = translate(
'password_rules_at_least', translate(
'one'), translate(
'capital_letter'));
575 if (SQ_PASSWD_RULE_NUM_LOWER == 1) {
576 $res[] = translate(
'password_rules_at_least', translate(
'one'), translate(
'lowercase_letter'));
578 if (SQ_PASSWD_RULE_NUM_INT == 1) {
579 $res[] = translate(
'password_rules_at_least', translate(
'one'), translate(
'numeric_digit'));
581 if (SQ_PASSWD_RULE_NUM_PUNC == 1) {
582 $res[] = translate(
'password_rules_at_least', translate(
'one'), translate(
'punctuation_character'));
584 if (SQ_PASSWD_RULE_NUM_SPC == 1) {
585 $res[] = translate(
'password_rules_at_least', translate(
'one'), translate(
'space'));
588 $disallowed_chars = Array();
589 if (SQ_PASSWD_RULE_NUM_CAPS == -1) {
590 $disallowed_chars[] = translate(
'capital_letters');
592 if (SQ_PASSWD_RULE_NUM_LOWER == -1) {
593 $disallowed_chars[] = translate(
'lowercase_letters');
595 if (SQ_PASSWD_RULE_NUM_INT == -1) {
596 $disallowed_chars[] = translate(
'numeric_digits');
598 if (SQ_PASSWD_RULE_NUM_PUNC == -1) {
599 $disallowed_chars[] = translate(
'punctuation_characters');
601 if (SQ_PASSWD_RULE_NUM_SPC == -1) {
602 $disallowed_chars[] = translate(
'spaces');
604 if (!empty($disallowed_chars)) {
605 include_once SQ_FUDGE_PATH.
'/general/text.inc';
606 $res[] = ucfirst(translate(
'password_rules_not_allowed', make_readable_list($disallowed_chars, strtolower(translate(
'and')))));
609 if (trim(SQ_PASSWD_RULE_BLACK_LIST) !=
'') {
610 $black_words = Array();
611 foreach (explode(
"\n", SQ_PASSWD_RULE_BLACK_LIST) as $word) {
612 $black_words[] =
'"'.trim($word).
'"';
614 if (!empty($black_words)) {
615 if (SQ_PASSWD_RULE_BLACK_LIST_EXACT) {
616 $res[] = translate(
'password_rules_blacklist_strict', implode(
', ', $black_words));
618 $res[] = translate(
'password_rules_blacklist_loose', implode(
', ', $black_words));
624 return translate(
'password_rules_intro').
'<ul class="password-rules"><li>'.implode(
'</li><li>', $res).
'</li></ul>';
642 return ($this->
attr(
'first_name') || $this->
attr(
'last_name')) ? $this->
attr(
'first_name').
' '.$this->
attr(
'last_name') : $this->
attr(
'username');
661 if (empty($assetids)) {
663 if ($GLOBALS[
'SQ_SYSTEM']->userRoot())
return TRUE;
665 if ($GLOBALS[
'SQ_SYSTEM']->userRoot($this)) {
668 }
else if ($GLOBALS[
'SQ_SYSTEM']->userSystemAdmin($this)) {
671 if (!$GLOBALS[
'SQ_SYSTEM']->userSystemAdmin()) {
674 if ($this->
id == $GLOBALS[
'SQ_SYSTEM']->currentUserId()) {
680 if ($GLOBALS[
'SQ_SYSTEM']->userSystemAdmin()) {
683 if ($this->
id == $GLOBALS[
'SQ_SYSTEM']->currentUserId()) {
690 if (in_array($this->
id, $assetids))
return TRUE;
694 return parent::_checkPermissionAccess($perm, $assetids);
709 if ($GLOBALS[
'SQ_PURGING_TRASH'])
return TRUE;
713 if (!empty($inbox_link) && ($inbox_link[
'linkid'] == $linkid)) {
714 return translate(
'cannot_delete_inbox-user_link');
718 if (!empty($workspace_link) && ($workspace_link[
'linkid'] == $linkid)) {
719 return translate(
'cannot_delete_workspace-user_link');
722 return parent::isDeletableLink($linkid);
737 if ($this->status & SQ_SC_STATUS_NOT_LIVE) {
742 if ($GLOBALS[
'SQ_SYSTEM']->am->assetInTrash($this->id, TRUE)) {
791 if (!isset($_SESSION[
'sq_user_groups'][$this->
id])) {
794 $fetch_roles = ((SQ_CONF_ENABLE_ROLES_PERM_SYSTEM ==
'1' || SQ_CONF_ENABLE_ROLES_WF_SYSTEM ==
'1') && (SQ_CONF_ENABLE_GLOBAL_ROLES ==
'1'));
795 $group_types = Array(
'user',
'user_group',
'system_user_group');
796 if ($fetch_roles) $group_types[] =
'role';
797 $_SESSION[
'sq_user_groups'] = Array($this->
id => $GLOBALS[
'SQ_SYSTEM']->am->getParents($this->id, $group_types, TRUE));
799 return $_SESSION[
'sq_user_groups'][$this->id];
815 if (!isset($_SESSION[
'sq_effective_user_groups'][$this->
id])) {
816 $_SESSION[
'sq_effective_user_groups'][$this->id] = Array();
817 $fetch_roles = ((SQ_CONF_ENABLE_ROLES_PERM_SYSTEM ==
'1' || SQ_CONF_ENABLE_ROLES_WF_SYSTEM ==
'1') && (SQ_CONF_ENABLE_GLOBAL_ROLES ==
'1'));
818 $groupids = $GLOBALS[
'SQ_SYSTEM']->am->getParents($this->
id,
'user_group', FALSE);
819 foreach ($groupids as $groupid => $type_code) {
822 if (!(($type_code ==
'role') && !$fetch_roles)) {
824 $_SESSION[
'sq_effective_user_groups'][$this->id][] = $groupid;
829 return $_SESSION[
'sq_effective_user_groups'][$this->id];
847 $restrictions = $this->
attr(
'restrictions');
851 if (!in_array($group_assetid, array_keys($restrictions))) {
856 foreach ($restrictions[$group_assetid] as $restriction) {
859 $condition_type_code = $restriction[
'name'];
860 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset($condition_type_code);
861 $condition =
new $condition_type_code();
863 $match = $condition->evaluate($this, $restriction[
'condition_data']);
866 if ($match != $restriction[
'match'])
return FALSE;
884 return $GLOBALS[
'SQ_SYSTEM']->am->getLink($this->
id, SQ_LINK_TYPE_2,
'inbox');
897 return $GLOBALS[
'SQ_SYSTEM']->am->getLink($this->
id, SQ_LINK_TYPE_2,
'workspace');
914 trigger_localised_error(
'CORE0109', E_USER_WARNING,$this->name);
918 $workspace = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($link[
'minorid']);
919 if (is_null($workspace)) {
920 trigger_localised_error(
'CORE0109', E_USER_WARNING,$this->name);
937 <table border=
"0" cellspacing=
"2" cellpadding=
"2">
939 <td><b>Username</b></td>
940 <td><?php echo $this->
attr(
'username'); ?></td>
943 <td><b>First Name</b></td>
944 <td><?php echo $this->
attr(
'first_name'); ?></td>
947 <td><b>Last Name</b></td>
948 <td><?php echo $this->
attr(
'last_name'); ?></td>
951 <td><b>Email</b></td>
952 <td><?php echo $this->
attr(
'email'); ?></td>
973 return (($username !=
'') && ($password !=
''));
990 if ($username ===
'') {
991 $this->_tmp[
'blank_username_caught'] = TRUE;
1012 $class_name =
'locking_method_'.SQ_CONF_LOCKING_METHOD;
1013 $GLOBALS[
'SQ_SYSTEM']->am->includeAsset($class_name);
1015 if (eval(
'return '.$class_name.
'::supportsGetActiveLocks();') === TRUE) {
1016 $result = eval(
'return '.$class_name.
'::getActiveLocks($this->id);');
1022 }
catch (Exception $e) {
1023 throw new Exception(
'Unable to get all locks for current user (userid #'.$this->
id.
'), '.$e->getMessage());
1040 $am = $GLOBALS[
'SQ_SYSTEM']->am;
1042 foreach ($current_locks as $lock_data) {
1043 $GLOBALS[
'SQ_SYSTEM']->releaseLock($lock_data[
'lockid']);
1058 $keywords = parent::getAvailableKeywords();
1059 $keywords[
'asset_attribute_email_image'] = translate(
'user_email_image');
1080 $replacement = NULL;
1083 $full_keyword = $keyword;
1084 $keyword = parse_keyword($keyword, $modifiers);
1085 $contextid = extract_context_modifier($modifiers);
1087 if ($contextid !== NULL) {
1092 if ((
int)$contextid !== $GLOBALS[
'SQ_SYSTEM']->getContextId()) {
1093 $GLOBALS[
'SQ_SYSTEM']->changeContext($contextid);
1094 $contexted_asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($this->
id);
1097 $replacement = $contexted_asset->getKeywordReplacement($keyword);
1100 apply_keyword_modifiers($replacement, $modifiers, Array(
'assetid' => $contexted_asset->id));
1102 unset($contexted_asset);
1103 $GLOBALS[
'SQ_SYSTEM']->restoreContext();
1104 return $replacement;
1111 if ($keyword ==
'asset_attribute_email_image') {
1112 $email = $this->
attr(
'email');
1113 $email_image_link =
'';
1114 if (!empty($email)) {
1115 $img_url = $_SERVER[
'PHP_SELF'].
'?SQ_ACTION=attribute_image&id='.$this->
id.
'&attribute=email';
1116 $email_image_link =
'<img id="email_'.$this->id.
'" src="'.$img_url.
'" />';
1118 $replacement = $email_image_link;
1121 if ($replacement !== NULL) {
1122 if (count($modifiers) > 0) {
1123 apply_keyword_modifiers($replacement, $modifiers, Array(
'assetid' => $this->
id));
1127 $replacement = parent::getKeywordReplacement($full_keyword);
1130 return $replacement;
1148 $prepared =
MatrixDAL::preparePdoQuery(
'SELECT custom_val FROM sq_ast_attr_uniq_val WHERE owning_attrid=:owning_attrid AND assetid=:assetid');
1152 }
catch (Exception $e) {
1153 throw new Exception(
'Unable to open database due to database error: '.$e->getMessage());
1157 return (!empty($current_values));