Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

New field "guid" added to table user.

This can be userd to store "global unique identifier" from external databases
like Windows SID or eDirectorys guid . This will keep upcoming user syncronization
feature reliable in case of renamed users.
Mysql files are untested.
php -l mysql.php does not show any syntax errors, so files
should work.
  • Loading branch information...
commit 01e2ea5fa33acdc6ba0f2ef7adfe5fbbae8282ff 1 parent e10bb9b
paca70 authored
5 lib/db/mysql.php
View
@@ -849,6 +849,11 @@ function main_upgrade($oldversion=0) {
if ($oldversion < 2004082900) { // Make sure guest is "manual" too.
set_field('user', 'auth', 'manual', 'username', 'guest');
}
+
+ if ($oldversion < 2004090300) { // Add guid-field used in user syncronization
+ table_column('user', '', 'guid', 'varchar', '128', '', '', '', 'auth');
+ execute_sql("ALTER TABLE {$CFG->prefix}user ADD INDEX authguid (auth, guid)");
+ }
return $result;
3  lib/db/mysql.sql
View
@@ -308,6 +308,7 @@ CREATE TABLE `prefix_scale` (
CREATE TABLE `prefix_user` (
`id` int(10) unsigned NOT NULL auto_increment,
`auth` varchar(20) NOT NULL default 'manual',
+ `guid` varchar(128) default NULL,
`confirmed` tinyint(1) NOT NULL default '0',
`deleted` tinyint(1) NOT NULL default '0',
`username` varchar(100) NOT NULL default '',
@@ -346,6 +347,8 @@ CREATE TABLE `prefix_user` (
UNIQUE KEY `id` (`id`),
UNIQUE KEY `username` (`username`)
) TYPE=MyISAM COMMENT='One record for each person';
+
+ALTER TABLE `prefix_user` ADD INDEX `authguid` (`auth`, `guid`);
# --------------------------------------------------------
#
5 lib/db/postgres7.php
View
@@ -584,6 +584,11 @@ function main_upgrade($oldversion=0) {
set_field('user', 'auth', 'manual', 'username', 'guest');
}
+ if ($oldversion < 2004090300) { // Add guid-field used in user syncronization
+ table_column('user', '', 'guid', 'varchar', '128', '', '', '', 'auth');
+ execute_sql("CREATE INDEX {$CFG->prefix}user_auth_guid_idx ON {$CFG->prefix}user (auth, guid)");
+ }
+
return $result;
}
3  lib/db/postgres7.sql
View
@@ -198,6 +198,7 @@ CREATE INDEX prefix_cache_text_md5key_idx ON prefix_cache_text (md5key);
CREATE TABLE prefix_user (
id SERIAL PRIMARY KEY,
auth varchar(20) NOT NULL default 'manual',
+ guid varchar(128) default NULL,
confirmed integer NOT NULL default '0',
deleted integer NOT NULL default '0',
username varchar(100) NOT NULL default '',
@@ -235,6 +236,8 @@ CREATE TABLE prefix_user (
CONSTRAINT prefix_user_username_uk UNIQUE (username)
);
+CREATE INDEX prefix_user_auth_guid_idx ON prefix_user (auth, guid);
+
CREATE TABLE prefix_user_admins (
id SERIAL PRIMARY KEY,
userid integer NOT NULL default '0'
2  version.php
View
@@ -5,7 +5,7 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2004083000; // The current version is a date (YYYYMMDDXX)
+$version = 2004090300; // The current version is a date (YYYYMMDDXX)
$release = "1.5 unstable development"; // User-friendly version number
Please sign in to comment.
Something went wrong with that request. Please try again.