1.1 --- a/public_html/admin/install/lib-upgrade.php Fri Apr 29 19:03:36 2011 +0100
1.2 +++ b/public_html/admin/install/lib-upgrade.php Fri Apr 29 18:57:55 2011 -0400
1.3 @@ -508,6 +508,8 @@
1.4 update_ConfValuesFor180();
1.5
1.6 update_ConfigSecurityFor180();
1.7 +
1.8 + update_UsersFor180();
1.9
1.10 $current_gl_version = '1.8.0';
1.11 $_SQL = '';
2.1 --- a/sql/updates/mssql_1.7.2_to_1.8.0.php Fri Apr 29 19:03:36 2011 +0100
2.2 +++ b/sql/updates/mssql_1.7.2_to_1.8.0.php Fri Apr 29 18:57:55 2011 -0400
2.3 @@ -62,6 +62,28 @@
2.4
2.5
2.6 /**
2.7 + * Add passwords for OAuth and OpenID users
2.8 + *
2.9 + */
2.10 +function update_UsersFor180()
2.11 +{
2.12 + global $_TABLES;
2.13 +
2.14 + $passwords = array();
2.15 +
2.16 + $sql = "SELECT uid FROM {$_TABLES['users']} WHERE (remoteservice IS NOT NULL OR remoteservice != '') AND passwd = ''";
2.17 + $result = DB_query($sql);
2.18 + $nrows = DB_numRows($result);
2.19 +
2.20 + for($i = 0; $i < $nrows; $i++) {
2.21 + $A = DB_fetchArray($result);
2.22 +
2.23 + $passwords = USER_createPassword($A['uid']);
2.24 + }
2.25 +
2.26 +}
2.27 +
2.28 +/**
2.29 * Add is new security rights for the new Group "Configuration Admin"
2.30 *
2.31 */
3.1 --- a/sql/updates/mysql_1.7.2_to_1.8.0.php Fri Apr 29 19:03:36 2011 +0100
3.2 +++ b/sql/updates/mysql_1.7.2_to_1.8.0.php Fri Apr 29 18:57:55 2011 -0400
3.3 @@ -62,6 +62,28 @@
3.4
3.5
3.6 /**
3.7 + * Add passwords for OAuth and OpenID users
3.8 + *
3.9 + */
3.10 +function update_UsersFor180()
3.11 +{
3.12 + global $_TABLES;
3.13 +
3.14 + $passwords = array();
3.15 +
3.16 + $sql = "SELECT uid FROM {$_TABLES['users']} WHERE (remoteservice IS NOT NULL OR remoteservice != '') AND passwd = ''";
3.17 + $result = DB_query($sql);
3.18 + $nrows = DB_numRows($result);
3.19 +
3.20 + for($i = 0; $i < $nrows; $i++) {
3.21 + $A = DB_fetchArray($result);
3.22 +
3.23 + $passwords = USER_createPassword($A['uid']);
3.24 + }
3.25 +
3.26 +}
3.27 +
3.28 +/**
3.29 * Add is new security rights for the new Group "Configuration Admin"
3.30 *
3.31 */
4.1 --- a/sql/updates/pgsql_1.7.2_to_1.8.0.php Fri Apr 29 19:03:36 2011 +0100
4.2 +++ b/sql/updates/pgsql_1.7.2_to_1.8.0.php Fri Apr 29 18:57:55 2011 -0400
4.3 @@ -63,6 +63,28 @@
4.4
4.5
4.6 /**
4.7 + * Add passwords for OAuth and OpenID users
4.8 + *
4.9 + */
4.10 +function update_UsersFor180()
4.11 +{
4.12 + global $_TABLES;
4.13 +
4.14 + $passwords = array();
4.15 +
4.16 + $sql = "SELECT uid FROM {$_TABLES['users']} WHERE (remoteservice IS NOT NULL OR remoteservice != '') AND passwd = ''";
4.17 + $result = DB_query($sql);
4.18 + $nrows = DB_numRows($result);
4.19 +
4.20 + for($i = 0; $i < $nrows; $i++) {
4.21 + $A = DB_fetchArray($result);
4.22 +
4.23 + $passwords = USER_createPassword($A['uid']);
4.24 + }
4.25 +
4.26 +}
4.27 +
4.28 +/**
4.29 * Add is new security rights for the new Group "Configuration Admin"
4.30 *
4.31 */