Changeset 808 for trunk/install.php


Ignore:
Timestamp:
Aug 8, 2005, 10:52:19 PM (19 years ago)
Author:
plg
Message:
  • 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 table becomes user_cache so that not only restriction informations can be stored in this table.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install.php

    r801 r808  
    301301   
    302302    // webmaster admin user
    303     $query = 'INSERT INTO '.USERS_TABLE;
    304     $query.= ' (id,username,password,status,language,mail_address) VALUES ';
    305     $query.= "(1,'".$admin_name."','".md5( $admin_pass1 )."'";
    306     $query.= ",'admin','".$language."'";
    307     $query.= ",'".$admin_mail."');";
    308     mysql_query($query);
    309 
    310303    $query = '
    311 UPDATE '.USERS_TABLE.'
    312   SET feed_id = \''.find_available_feed_id().'\'
    313   WHERE id = 1
     304INSERT INTO '.USERS_TABLE.'
     305  (id,username,password,mail_address)
     306  VALUES
     307  (1,\''.$admin_name.'\',\''.md5($admin_pass1).'\',\''.$admin_mail.'\')
    314308;';
    315309    mysql_query($query);
    316    
     310
     311    $query = '
     312INSERT INTO '.USER_INFOS_TABLE.'
     313  (user_id,status,language)
     314  VALUES
     315  (1, \'admin\', \''.$language.'\')
     316;';
     317    mysql_query($query);
     318
     319    $query = '
     320UPDATE '.USER_INFOS_TABLE.'
     321  SET feed_id = \''.find_available_feed_id().'\'
     322  WHERE user_id = 1
     323;';
     324    mysql_query($query);
     325
    317326    // guest user
    318     $query = 'INSERT INTO '.USERS_TABLE;
    319     $query.= '(id,username,password,status,language) VALUES ';
    320     $query.= "(2,'guest','','guest','".$language."')";
    321     $query.= ';';
    322     mysql_query( $query );
     327    $query = '
     328INSERT INTO '.USERS_TABLE.'
     329  (id,username,password,mail_address)
     330  VALUES
     331  (2,\'guest\',\'\',\'\')
     332;';
     333    mysql_query($query);
     334
     335    $query = '
     336INSERT INTO '.USER_INFOS_TABLE.'
     337  (user_id,status,language)
     338  VALUES
     339  (2, \'guest\', \''.$language.'\')
     340;';
     341    mysql_query($query);
    323342  }
    324343}
Note: See TracChangeset for help on using the changeset viewer.