18 require_once SQ_CORE_PACKAGE_PATH.
'/users/user/user.inc';
44 parent::__construct($assetid);
61 require_once SQ_CORE_PACKAGE_PATH.
'/system/system_asset_fns.inc';
62 if (!system_asset_fns_create_pre_check($this)) {
65 $GLOBALS[
'SQ_SYSTEM']->changeDatabaseConnection(
'db2');
66 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'BEGIN');
68 parent::setAttrValue(
'username',
'');
69 parent::setAttrValue(
'first_name',
'Public');
70 parent::setAttrValue(
'last_name',
'User');
72 if ($linkid = parent::create($link)) {
73 if (!system_asset_fns_create_cleanup($this)) {
79 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'COMMIT');
81 $GLOBALS[
'SQ_SYSTEM']->doTransaction(
'ROLLBACK');
84 $GLOBALS[
'SQ_SYSTEM']->restoreDatabaseConnection();
99 public function morph($new_type_code)
102 trigger_localised_error(
'CORE0091', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
175 if ($name ==
'username') {
176 trigger_localised_error(
'CORE0113', E_USER_WARNING, $GLOBALS[
'SQ_SYSTEM']->am->getTypeInfo($this->type(),
'name'));
180 return parent::setAttrValue($name, $value);