process_form.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:1k
- <?php
- $user_management_obj
- = new UserManagement( $user_db );
- $user_privilege_management_obj
- = new UserAdminPrivilegesManagement( $admin_db );
- $temp_obj = new User;
- $temp_obj->user_name = $new_user;
- $ret_vals = $user_management_obj->Get( $temp_obj );
- if ( $ret_vals[ 0 ] == true ) {
- $action_success = 'User with that user name ' . $new_user_name . ' already!';
- } else {
- $temp_obj->password = $new_password;
- if ( $default->crypt_passwords == 1 ) {
- $temp_obj->password = $temp_obj->EncryptPassword();
- }
- $temp_obj->domain_id = $new_domain_id;
- if ( $new_login_enabled == 'true' ) {
- $temp_obj->login_deny = 1;
- } else {
- $temp_obj->login_deny = 0;
- }
- $ret_vals = $user_management_obj->Add( $temp_obj );
- $action_success = '';
- if( $ret_vals[ 0 ] == true ) {
- $action_success = 'User ' . $new_user_name . ' sucessfully added.';
- /* Add the privileges for the submodules */
- list( $status, $temp_obj ) = $user_management_obj->Get( $temp_obj );
- $temp_attr = new AdminPrivileges();
- $temp_attr->user_id = $temp_obj->user_id;
- $temp_attr->add_users = $new_add_users;
- $temp_attr->edit_users = $new_edit_users;
- $temp_attr->delete_users = $new_delete_users;
- $user_privilege_management_obj->Add( $temp_attr );
- } else {
- $action_success = 'ERROR in adding user : ' . $ret_vals[ 2 ];
- }
- }
- include( './manager/templates/user/user_navigator.inc' );
- ?>