add

About Me

My photo
Oracle Apps - Techno Functional consultant

Friday, August 22

Oracle EBS API to change user password and prompt to change their password the first attempt to login to the applications


The following API can be used to change the Ebs user password and prompt to change the same at the first logon,

    begin
    fnd_user_pkg.updateuser(
    x_user_name => 'username'
    , x_owner => 'CUST'
    , x_unencrypted_password => 'change123',
    x_password_date => to_date('2','J')
    );
    commit;
    end;

If we don't want to force the user to change the password, then we can remove the x_password_date from the api.

The standard FND_USER_PKG does this:

    decode(x_password_date, fnd_user_pkg.null_date, null,null,u.password_date, x_password_date)

    fnd_user_pkg.null_date is defined as to_date('2','J'),    which is 02-JAN-4712.

Hence, this decode says:

1. If the password_date parm = 02-JAN-4712, then set password date = null.
2. If the password_date is null, then set password date = existing password date (in effect does nothing)
3. Else use the existing password date (in effect does nothing).

No comments: