aboutsummaryrefslogtreecommitdiff
path: root/engine/schema
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-09 14:21:48 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-09 14:21:48 +0000
commite90692bc720cf4c520ee36c603395cf1e1b80b45 (patch)
tree63cb37887110ff6c782b65da036b7e74b6b08884 /engine/schema
parent6588ff3eb201cb9d9834323e670771daa87696c0 (diff)
downloadelgg-e90692bc720cf4c520ee36c603395cf1e1b80b45.tar.gz
elgg-e90692bc720cf4c520ee36c603395cf1e1b80b45.tar.bz2
Closes #668: Banning now works through a flag in the users_entity table. Database upgrade required.
* Added ElggUser::isBanned(); * Added 'banned' column to users_entity * Modified ban() and unban() * Modified pam functions to check $user->isBanned() * Modified login() to check $user->isBanned() * Modified sessions_init() to check isBanned() and destroy session accordingly * Modified profile views to highlight banned users and prevent menus for non-admin users. git-svn-id: https://code.elgg.org/elgg/trunk@2554 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/schema')
-rw-r--r--engine/schema/mysql.sql2
-rw-r--r--engine/schema/upgrades/2009010901.sql3
2 files changed, 4 insertions, 1 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 521cda27f..2c0dfa6aa 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -140,8 +140,8 @@ CREATE TABLE `prefix_users_entity` (
`email` text NOT NULL,
`language` varchar(6) NOT NULL default '',
`code` varchar(32) NOT NULL default '',
+ `banned` enum ('yes', 'no') NOT NULL default 'no',
-
`last_action` int(11) NOT NULL default '0',
`prev_last_action` int(11) NOT NULL default '0',
`last_login` int(11) NOT NULL default '0',
diff --git a/engine/schema/upgrades/2009010901.sql b/engine/schema/upgrades/2009010901.sql
new file mode 100644
index 000000000..29eb68f29
--- /dev/null
+++ b/engine/schema/upgrades/2009010901.sql
@@ -0,0 +1,3 @@
+-- Add banned column refs #668
+ALTER TABLE `prefix_users_entity` ADD COLUMN `banned` enum ('yes', 'no') NOT NULL default 'no' AFTER `code`;
+