#127 part2
This commit is contained in:
parent
300a113251
commit
e647ed4082
@ -3,9 +3,15 @@ namespace SYSTEM\SQL;
|
|||||||
class SYS_SAIMOD_SECURITY_USERS extends \SYSTEM\DB\QP {
|
class SYS_SAIMOD_SECURITY_USERS extends \SYSTEM\DB\QP {
|
||||||
public static function get_class(){return \get_class();}
|
public static function get_class(){return \get_class();}
|
||||||
public static function pgsql(){return
|
public static function pgsql(){return
|
||||||
'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, account_flag FROM system.user WHERE username LIKE $1 OR email LIKE $2 ORDER BY last_active DESC;';
|
'SELECT id,username,email,joindate,locale, EXTRACT(EPOCH FROM last_active) as last_active, email_confirmed'.
|
||||||
|
' FROM system.user'.
|
||||||
|
' WHERE username LIKE $1 OR email LIKE $2'.
|
||||||
|
' ORDER BY last_active DESC;';
|
||||||
}
|
}
|
||||||
public static function mysql(){return
|
public static function mysql(){return
|
||||||
'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, account_flag FROM system_user WHERE username LIKE ? OR email LIKE ? ORDER BY last_active DESC;';
|
'SELECT id,username,email,joindate,locale,unix_timestamp(last_active)as last_active, email_confirmed'.
|
||||||
|
' FROM system_user'.
|
||||||
|
' WHERE username LIKE ? OR email LIKE ?'.
|
||||||
|
' ORDER BY last_active DESC;';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,10 +4,10 @@ class SYS_SECURITY_AVAILABLE extends \SYSTEM\DB\QP {
|
|||||||
public static function get_class(){return \get_class();}
|
public static function get_class(){return \get_class();}
|
||||||
public static function pgsql(){return
|
public static function pgsql(){return
|
||||||
'SELECT COUNT(*) as count FROM '.\SYSTEM\SQL\system_user::NAME_PG.
|
'SELECT COUNT(*) as count FROM '.\SYSTEM\SQL\system_user::NAME_PG.
|
||||||
' WHERE lower('.\SYSTEM\SQL\system_user::FIELD_USERNAME.') like lower($1);';
|
' WHERE UPPER('.\SYSTEM\SQL\system_user::FIELD_USERNAME.') like UPPER($1);';
|
||||||
}
|
}
|
||||||
public static function mysql(){return
|
public static function mysql(){return
|
||||||
'SELECT COUNT(*) as count FROM '.\SYSTEM\SQL\system_user::NAME_MYS.
|
'SELECT COUNT(*) as count FROM '.\SYSTEM\SQL\system_user::NAME_MYS.
|
||||||
' WHERE lower('.\SYSTEM\SQL\system_user::FIELD_USERNAME.') like lower(?);';
|
' WHERE UPPER('.\SYSTEM\SQL\system_user::FIELD_USERNAME.') like UPPER(?);';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -519,6 +519,7 @@
|
|||||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_rename', 'enUS', 'Rename', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_rename', 'enUS', 'Rename', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rename', 'basic');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rename', 'basic');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rename', 'sai_files');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rename', 'sai_files');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_rename', 'sai_security');
|
||||||
|
|
||||||
DELETE FROM `system_text` WHERE id = 'basic_upload';
|
DELETE FROM `system_text` WHERE id = 'basic_upload';
|
||||||
DELETE FROM `system_text_tag` WHERE id = 'basic_upload';
|
DELETE FROM `system_text_tag` WHERE id = 'basic_upload';
|
||||||
@ -649,6 +650,62 @@
|
|||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generate', 'basic');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generate', 'basic');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generate', 'sai_docu');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_generate', 'sai_docu');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_confirm_email';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_confirm_email';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_confirm_email', 'deDE', 'EMail bestätigen', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_confirm_email', 'enUS', 'Confirm EMail', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_confirm_email', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_confirm_email', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_change_password';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_change_password';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_change_password', 'deDE', 'Password ändern', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_change_password', 'enUS', 'Change Password', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_change_password', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_change_password', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_reset_password';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_reset_password';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_reset_password', 'deDE', 'Password zurücksetzen', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_reset_password', 'enUS', 'Reset Password', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_reset_password', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_reset_password', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_change_email';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_change_email';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_change_email', 'deDE', 'EMail ändern', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_change_email', 'enUS', 'Change EMail', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_change_email', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_change_email', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_password_old';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_password_old';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_old', 'deDE', 'Altes Passwort', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_old', 'enUS', 'Old Password', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_old', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_old', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_password_new';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_password_new';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_new', 'deDE', 'Neues Passwort', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_password_new', 'enUS', 'New Password', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_new', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_password_new', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_email_new';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_email_new';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_email_new', 'deDE', 'Neue Email', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_email_new', 'enUS', 'New Email', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_email_new', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_email_new', 'sai_security');
|
||||||
|
|
||||||
|
DELETE FROM `system_text` WHERE id = 'basic_username_new';
|
||||||
|
DELETE FROM `system_text_tag` WHERE id = 'basic_username_new';
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_username_new', 'deDE', 'Neuer Username', 1, 1, '2015-04-16 23:11:18', '2015-04-16 16:48:36');
|
||||||
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('basic_username_new', 'enUS', 'New Username', 2, 1, '2015-04-16 23:11:18', '2015-04-16 23:11:18');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_username_new', 'basic');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('basic_username_new', 'sai_security');
|
||||||
|
|
||||||
-- SAI
|
-- SAI
|
||||||
DELETE FROM `system_text` WHERE id = 'sai_api_title';
|
DELETE FROM `system_text` WHERE id = 'sai_api_title';
|
||||||
DELETE FROM `system_text_tag` WHERE id = 'sai_api_title';
|
DELETE FROM `system_text_tag` WHERE id = 'sai_api_title';
|
||||||
@ -1230,6 +1287,7 @@
|
|||||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'deDE', 'Aktion', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25');
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'deDE', 'Aktion', 2, 2, '2015-04-23 01:58:25', '2015-04-23 01:58:25');
|
||||||
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'enUS', 'Action', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
|
INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_action', 'enUS', 'Action', 2, 2, '2015-04-18 13:56:53', '2015-04-18 13:56:53');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'sai_todo');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'sai_todo');
|
||||||
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'sai_security');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'table');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_action', 'table');
|
||||||
|
|
||||||
DELETE FROM `system_text` WHERE id = 'table_username';
|
DELETE FROM `system_text` WHERE id = 'table_username';
|
||||||
@ -1350,6 +1408,11 @@
|
|||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'sai_security');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'sai_security');
|
||||||
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'table');
|
INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('table_reset_password', 'table');
|
||||||
|
|
||||||
|
REPLACE INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email_confirmed', 'deDE', 'Email bestätigt', 10, 10, '2016-06-01 15:49:43', '2016-06-01 15:49:43');
|
||||||
|
REPLACE INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('table_email_confirmed', 'enUS', 'Email Confirmed', 10, 10, '2016-06-01 15:49:28', '2016-06-01 15:49:28');
|
||||||
|
REPLACE INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email_confirmed', 'sai_security');
|
||||||
|
REPLACE INTO `system_text_tag` (`id`, `tag`) VALUES ('table_email_confirmed', 'table');
|
||||||
|
|
||||||
-- Time
|
-- Time
|
||||||
|
|
||||||
DELETE FROM `system_text` WHERE id = 'time_ago';
|
DELETE FROM `system_text` WHERE id = 'time_ago';
|
||||||
|
|||||||
@ -6,8 +6,8 @@ CREATE TABLE `system_user` (
|
|||||||
`email` CHAR(255) NOT NULL,
|
`email` CHAR(255) NOT NULL,
|
||||||
`joindate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`joindate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`locale` CHAR(6) NOT NULL DEFAULT 'enUS',
|
`locale` CHAR(6) NOT NULL DEFAULT 'enUS',
|
||||||
`last_active` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`last_active` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`account_flag` INT(10) NULL DEFAULT NULL,
|
`email_confirmed` INT(11) NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
)
|
)
|
||||||
COLLATE='utf8_general_ci'
|
COLLATE='utf8_general_ci'
|
||||||
|
|||||||
@ -8,7 +8,7 @@ CREATE TABLE system."user"
|
|||||||
joindate timestamp with time zone NOT NULL DEFAULT now(),
|
joindate timestamp with time zone NOT NULL DEFAULT now(),
|
||||||
locale character varying(6) NOT NULL DEFAULT 'enUS'::character varying,
|
locale character varying(6) NOT NULL DEFAULT 'enUS'::character varying,
|
||||||
last_active timestamp with time zone NOT NULL DEFAULT now(),
|
last_active timestamp with time zone NOT NULL DEFAULT now(),
|
||||||
account_flag integer,
|
email_confirmed integer DEFAULT NULL,
|
||||||
CONSTRAINT system_user_pk_id PRIMARY KEY (id)
|
CONSTRAINT system_user_pk_id PRIMARY KEY (id)
|
||||||
)
|
)
|
||||||
WITH (
|
WITH (
|
||||||
|
|||||||
@ -15,5 +15,5 @@ class system_user {
|
|||||||
const FIELD_JOINDATE = 'joindate';
|
const FIELD_JOINDATE = 'joindate';
|
||||||
const FIELD_LOCALE = 'locale';
|
const FIELD_LOCALE = 'locale';
|
||||||
const FIELD_LAST_ACTIVE = 'last_active';
|
const FIELD_LAST_ACTIVE = 'last_active';
|
||||||
const FIELD_ACCOUNT_FLAG = 'account_flag';
|
const FIELD_EMAIL_CONFIRMED = 'email_confirmed';
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user