1. The API related to user information PKG.--APIs related to user processingfnd_user_pkg; --APIs related to user password handlingfnd_web_sec; --APIs related to user responsibility processingFnd_user_resp_groups_api; 2. Activate the failed user account.--------------------------------Process Instance----------------------------- SELECT * fromFnd_userWHERE user_name = 'QWR01'; ---Update the user and invalidate the user:DECLAREBEGINfnd_user_pkg. UpdateUser (X_user_name= 'QWR01', X_owner= NULL, X_end_date=sysdate);--You can also use the following, in fact, the same process is called. --fnd_user_pkg. Disableuser (' QWR01 ');END; --Batch failure users:DECLARE CURSORCur_disable_user is SELECT user_name fromFnd_userWHERE user_name inch("'); L_deal_count Number;BEGINL_deal_count:= 0; forRec_disable_userinchcur_disable_user LOOP fnd_user_pkg. Disableuser (Rec_disable_user.user_name); L_deal_count:=L_deal_count+L_deal_count; ENDLOOP; Dbms_output. Put_Line ('number of successful failed users:'||l_deal_count);END; ------------------Batch Failure user-------------------DECLARE CURSORCur_disable_user is SELECT user_name fromFnd_userWHERESysdatebetweenStart_date andNVL (end_date,sysdate+1) and user_name inch('QWR01'); L_deal_count Number;BEGINFnd_global. Apps_initialize (user_id=1183, resp_id=20420, resp_appl_id=1); L_deal_count:= 0; forRec_disable_userinchcur_disable_user LOOP fnd_user_pkg. Disableuser (Rec_disable_user.user_name); L_deal_count:=L_deal_count+1; ENDLOOP; COMMIT; Dbms_output. Put_Line ('number of successful failed users:'||l_deal_count);END; 3. Activate invalid user responsibilities.--increase the user's responsibilities:fnd_user_pkg. ADDRESP; --responsibility of the defunct user:fnd_user_pkg. Delresp;------------------------Failure of the user's responsibilities------------------------- ---Failure to perform a duty that is not used for a certain date. DECLARE CURSORcur_disable is SELECTFU.user_id, FU.user_name, Fresp. Application_short_name, Fresp. Responsibility_key, Fresp. Security_group_key, Fresp. Responsibility_name, Fresp. Start_date, Fresp. End_date, Resp_login. Max_start_time fromfnd_user_resp_groups_direct_v Fresp, Fnd_user FU, (SELECTFL.user_id, FLR. RESPONSIBILITY_ID,MAX(FLR. start_time) Max_start_time fromfnd_login_responsibilities flr,fnd_logins FLWHEREFLR. login_id=FL. login_idGROUP byFL.user_id, FLR. responsibility_id) Resp_loginWHERE 1=1 andFU.user_id =Fresp.user_id andResp_login.user_id(+)=Fresp.user_id andResp_login. RESPONSIBILITY_ID (+)=Fresp. responsibility_id and((sysdate-Resp_login. Max_start_time)>= - ORResp_login. Max_start_time is NULL) andSysdatebetweenFU. Start_date andNVL (FU. End_date,sysdate+1) andSysdatebetweenFresp. Start_date andNVL (Fresp. End_date,sysdate+1) andFU.user_name = 'QWR01' andFresp. Responsibility_key= 'Xyg-wh-wcb-om-query' ORDER byFU.user_name, Fresp. Responsibility_name; L_deal_count Number;BEGINFnd_global. Apps_initialize (user_id=1183, resp_id=20420, resp_appl_id=1); L_deal_count:= 0; DELETExyg_pub_common_table_temp; forRec_disableinchcur_disable LOOP fnd_user_pkg. Delresp (rec_disable.user_name, rec_disable. Application_short_name,rec_disable. Responsibility_key,rec_disable. Security_group_key); L_deal_count:=L_deal_count+1; ENDLOOP; COMMIT; Dbms_output. Put_Line ('number of successful failure duties:'||l_deal_count);END; 4. User password related.---Change password directly. This is a direct modification of the password, after the user logs back in, log in directly. After the password has been modified, the first time the user login must change the password process. SELECTFnd_web_sec.change_password ('QWR01','PASSWORD') fromDUAL; ---Verify the validity of the passwordSELECTFnd_web_sec.validate_login ('QWR01','PASSWORD') fromDUAL; ---Get the wrong information. SelectFnd_message.get () fromdual; ---Get an encrypted passwordDeclarel_enc_fnd_pwdVARCHAR2(4000); L_enc_user_pwdVARCHAR2(4000); L_returnVARCHAR2(4000);beginL_return:=Fnd_web_sec.get_encrypted_passwords ('QWR01',5954,'PASSWORD1', L_enc_fnd_pwd,l_enc_user_pwd);D bms_output. Put_Line ('L_return:'||l_return);D bms_output. Put_Line ('p_enc_fnd_pwd:'||L_enc_fnd_pwd||CHR (Ten)||'p_enc_user_pwd:'||l_enc_user_pwd);End; ---Modified: Encrypted_user_password, not tested for the time being. DeclareNewpassvarchar2( -);beginNewpass:=Fnd_user_pkg.getreencryptedpassword ('QWR01','NEWKEY'); Dbms_output. Put_Line ('Newpass:'||newpass); --Fnd_user_pkg.setreencryptedpassword (' QWR01 ', Newpass, ' NEWKEY ');End;
Oracle EBS FND user Info API (GO) EBS account password responsibility related