- new : external authentication in another users table. Previous users table
is divided between users (common properties with any web application) and user_infos (phpwebgallery specific informations). External table and fields can be configured. - modification : profile.php is not reachable through administration anymore (not useful). - modification : in profile.php, current password is mandatory only if user tries to change his password. Username can't be changed. - deletion : of obsolete functions get_user_restrictions, update_user_restrictions, get_user_all_restrictions, is_user_allowed, update_user - modification : $user['forbidden_categories'] equals at least "-1" so that category_id NOT IN ($user['forbidden_categories']) can always be used. - modification : user_forbidden table becomes user_cache so that not only restriction informations can be stored in this table. git-svn-id: http://piwigo.org/svn/trunk@808 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
8b97a8154e
commit
273884a652
23 changed files with 633 additions and 736 deletions
47
install.php
47
install.php
|
|
@ -300,26 +300,45 @@ if ( isset( $_POST['install'] ))
|
|||
mysql_query( $query );
|
||||
|
||||
// webmaster admin user
|
||||
$query = 'INSERT INTO '.USERS_TABLE;
|
||||
$query.= ' (id,username,password,status,language,mail_address) VALUES ';
|
||||
$query.= "(1,'".$admin_name."','".md5( $admin_pass1 )."'";
|
||||
$query.= ",'admin','".$language."'";
|
||||
$query.= ",'".$admin_mail."');";
|
||||
$query = '
|
||||
INSERT INTO '.USERS_TABLE.'
|
||||
(id,username,password,mail_address)
|
||||
VALUES
|
||||
(1,\''.$admin_name.'\',\''.md5($admin_pass1).'\',\''.$admin_mail.'\')
|
||||
;';
|
||||
mysql_query($query);
|
||||
|
||||
$query = '
|
||||
UPDATE '.USERS_TABLE.'
|
||||
SET feed_id = \''.find_available_feed_id().'\'
|
||||
WHERE id = 1
|
||||
INSERT INTO '.USER_INFOS_TABLE.'
|
||||
(user_id,status,language)
|
||||
VALUES
|
||||
(1, \'admin\', \''.$language.'\')
|
||||
;';
|
||||
mysql_query($query);
|
||||
|
||||
|
||||
$query = '
|
||||
UPDATE '.USER_INFOS_TABLE.'
|
||||
SET feed_id = \''.find_available_feed_id().'\'
|
||||
WHERE user_id = 1
|
||||
;';
|
||||
mysql_query($query);
|
||||
|
||||
// guest user
|
||||
$query = 'INSERT INTO '.USERS_TABLE;
|
||||
$query.= '(id,username,password,status,language) VALUES ';
|
||||
$query.= "(2,'guest','','guest','".$language."')";
|
||||
$query.= ';';
|
||||
mysql_query( $query );
|
||||
$query = '
|
||||
INSERT INTO '.USERS_TABLE.'
|
||||
(id,username,password,mail_address)
|
||||
VALUES
|
||||
(2,\'guest\',\'\',\'\')
|
||||
;';
|
||||
mysql_query($query);
|
||||
|
||||
$query = '
|
||||
INSERT INTO '.USER_INFOS_TABLE.'
|
||||
(user_id,status,language)
|
||||
VALUES
|
||||
(2, \'guest\', \''.$language.'\')
|
||||
;';
|
||||
mysql_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue