username = $_POST['username_']; $user_data->password = $_POST['password']; $user_data->role = $_POST['role']; $library_string = $_POST['libraries']; $libraries = split(":", $library_string); add_user($user, $user_data, $libraries); } else if ($method == "deleteUser") { $username = $_POST['username_']; $data = split(":", $username); delete_user($user, $data[0]); } else if ($method == "modifyUser") { // username should be in the form guid:role:name $data = split(":", $_POST['username_']); $user_data->guid = $data[0]; $user_data->role = $_POST['role']; $user_data->adminPassword = $_POST['adminPassword']; $user_data->username = $data[2]; $user_data->password = $_POST['password']; $libraries = split(":", $_POST['libraries']); //error_log("User name: $user_data->username Guid: $user_data->guid " . // "Password: $user_data->password Role: $user_data->role Libraries" . // $_POST['libraries']); error_log("-- START: VALIDATE ADMIN PASSWORD --"); $verifyUser = @login( $user->username, $user_data->adminPassword, $_SERVER[REMOTE_HOST], $_SERVER[REMOTE_ADDR], $_POST['LDAPDomain'], session_id() ); if( !isset($verifyUser) || $verifyUser->reason > 0 ) { error_log($user_data->username ." PASSWORD INCORRECT: ".$user_data->adminPassword); $hasError = true; $status->setErrorCode(0x50013); } else { /*########################################################################## # Note: When we test the service users login password by logging in # We log ourself out becasue of the service user logallothers out feature. # So we need to use the new login session from now on - so DON'T log it # out like we do for admins. ##########################################################################*/ if( $user->role == SERVICE_ROLE ) { // Set the currect session to the newly login in service user. $_SESSION['user'] = $verifyUser; $user = $verifyUser; } else @logoff( $verifyUser ); } error_log("-- DONE: VALIDATE ADMIN PASSWORD --"); if( ! $hasError ) modify_user($user, $user_data, $libraries); } print $status->out(); return; } $user_info = get_all_users($user); $libs = get_logical_libraries($user, $sortCriteria); $emulationMap = get_emulation_map($user); ?> Setup Users
role != ADMIN_ROLE ) { $lib_list = ""; foreach( $theuser->libraries as $lib) { if( $lib_list == "" ) { $lib_list = $lib->guid; } else { $lib_list = $lib_list .':'. $lib->guid; } } echo ""; } } ?>
Modify User Account
Modify the information below for this user account:

Enter your role?> password:

User Name: User
Enter new password for selected user name:
Confirm new password for selected user name:
Select Privilege: Administrator
User
Modify User Account - Account Name
Check the library partition(s) this user account can access:
Library Name: Library Type: Media Type:
None None None
emulationTypeEnum] = "ML6000"; $libName = "lib" . $i; $i++; ?>
name ?> emulationTypeEnum] ?> mediaDomain ?>