標籤:成功 tput 登入 sam acl 並且 入參 bsp next
---修改密碼,並且將限制使用者下次登入的時候(第一次登入),強制要換一個新的口令:---此過程可以完全類比我們在標準使用者的Form裡面初始化使用者的密碼的動作! ---最後要說明的是,這個處理過程是通過研究標準建立使用者的畫面得出來的結果,所以,如果有需要,請放心使用!SELECT last_logon_date,password_date,LAST_UPDATE_DATE,LAST_UPDATE_LOGINFROM FND_USERWHERE USER_NAME = ‘QWR01‘; DECLARE P_USER_NAME FND_USER.USER_NAME%TYPE; P_INIT_PASSWORD VARCHAR2(30);---初始化密碼,非加密的。 --- l_change_flag VARCHAR2(10); l_reason varchar2(2000);BEGIN ---輸入參數(使用者名稱和初始化的密碼) P_USER_NAME := ‘QWR01‘; P_INIT_PASSWORD := ‘PWD123‘; --------- ---處理-- L_change_FLAG := fnd_web_sec.change_password(P_USER_NAME,P_INIT_PASSWORD); IF L_change_FLAG = ‘Y‘ THEN -- Bug 7016473 - During an administrative reset, set the last_logon_date to NULL -- instead of SYSDATE. last_logon_date should reflect the date the user last -- logged in successfully, not the date the user‘s password was reset. -- This does not regress the fix for bug 4690441 because in fnd_web_sec.disable_user -- if last_logon_date is NULL, the last_update_date will be used which is the same -- date of the sysadmin reset, so the effect is the same. -- -- Reset password_date field to null to force password -- expiration the next time user logs on. -- UPDATE FND_USER SET last_logon_date= NULL ,password_date = NULL --,LAST_UPDATE_DATE = SYSDATE --,LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID WHERE USER_NAME = P_USER_NAME; COMMIT; ---- DBMS_OUTPUT.PUT_LINE(‘成功初始化使用者(‘||P_USER_NAME||‘)的密碼為:‘||P_INIT_PASSWORD); ELSE ---顯示為什麼不可以修改 l_reason := fnd_message.get; fnd_message.set_name(‘FND‘, ‘FND_CHANGE_PASSWORD_FAILED‘); fnd_message.set_token(‘USER_NAME‘, P_USER_NAME); fnd_message.set_token(‘REASON‘, l_reason); app_exception.raise_exception; END IF;END;
Oracle EBS 初始化使用者密碼(轉)