Insert the required users details to the custom table:
Select * from fnd_user where user_name in (Select username from USER_T) order by user_name
-- procedure to change passowrd
DECLARE
cursor C1 IS Select * from USER_T;
flag_value BOOLEAN;
BEGIN
FOR I IN C1 LOOP
flag_value :=
fnd_user_pkg.changepassword (username => I.USERNAME,newpassword => 'welcome1');
IF flag_value
THEN
DBMS_OUTPUT.PUT_LINE ('The password reset successfully');
ELSE
DBMS_OUTPUT.PUT_LINE ('The password reset has failed');
END IF;
end loop;
COMMIT;
END;
-- procedure to update mail address
DECLARE
cursor C1 IS Select * from USER_T;
BEGIN
FOR I IN C1 LOOP
FND_USER_PKG.UPDATEUSER(x_user_name => i.username,
x_owner => NULL,
x_email_address => '');
end loop;
COMMIT;
END;
-- query to check modified users
SELECT usr.user_name,
get_pwd.decrypt
((SELECT (SELECT get_pwd.decrypt
(fnd_web_sec.get_guest_username_pwd,
usertable.encrypted_foundation_password
)
FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name =
(SELECT SUBSTR
(fnd_web_sec.get_guest_username_pwd,
1,
INSTR
(fnd_web_sec.get_guest_username_pwd,
'/'
)
- 1
)
FROM DUAL)),
usr.encrypted_user_password
) PASSWORD,usr.EMAIL_ADDRESS
FROM fnd_user usr
WHERE usr.user_name in (Select username from USER_T) order by user_name;
Select * from fnd_user where user_name in (Select username from USER_T) order by user_name
-- procedure to change passowrd
DECLARE
cursor C1 IS Select * from USER_T;
flag_value BOOLEAN;
BEGIN
FOR I IN C1 LOOP
flag_value :=
fnd_user_pkg.changepassword (username => I.USERNAME,newpassword => 'welcome1');
IF flag_value
THEN
DBMS_OUTPUT.PUT_LINE ('The password reset successfully');
ELSE
DBMS_OUTPUT.PUT_LINE ('The password reset has failed');
END IF;
end loop;
COMMIT;
END;
-- procedure to update mail address
DECLARE
cursor C1 IS Select * from USER_T;
BEGIN
FOR I IN C1 LOOP
FND_USER_PKG.UPDATEUSER(x_user_name => i.username,
x_owner => NULL,
x_email_address => '');
end loop;
COMMIT;
END;
-- query to check modified users
SELECT usr.user_name,
get_pwd.decrypt
((SELECT (SELECT get_pwd.decrypt
(fnd_web_sec.get_guest_username_pwd,
usertable.encrypted_foundation_password
)
FROM DUAL) AS apps_password
FROM fnd_user usertable
WHERE usertable.user_name =
(SELECT SUBSTR
(fnd_web_sec.get_guest_username_pwd,
1,
INSTR
(fnd_web_sec.get_guest_username_pwd,
'/'
)
- 1
)
FROM DUAL)),
usr.encrypted_user_password
) PASSWORD,usr.EMAIL_ADDRESS
FROM fnd_user usr
WHERE usr.user_name in (Select username from USER_T) order by user_name;
No comments:
Post a Comment