cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement getLastSuccessfulLogonDate API

Former Member
0 Kudos

Hello All,

I´m using the SAP Portal 7.01 SP6 and I wish an way to get the LastSuccessfulLogonDate of User UME.

The method getLastSuccessfulLogonDate do not work anymore because it was deprecated.

Does someone know another way to get this information? Is there some replacement API for that?

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

That does not exist anymore. So I developed some code for it. It uses standart UME fields.

Former Member
0 Kudos

Hello Erhan,

Thanks for your answer , I really appreciate it.

I gonna think some way to fix this issue.

[]´

Former Member
0 Kudos

I think this will work ok:

/thread/297107 [original link is broken]

Answers (2)

Answers (2)

Former Member
0 Kudos

now is working.

Former Member
0 Kudos

Still not working

Former Member
0 Kudos

Hello All,

If I insert the code bellow inside the MastHead(com.sap.portal.navigation.masthead.par) of Portal, then the method getLastSuccessfulLogonDate work OK.

String userName = request.getUser().getUniqueName();
try{
IUserAccount userAccount = UMFactory.getUserAccountFactory().getUserAccountByLogonId(userName);
IUserAccount mutableUserAccount = UMFactory.getUserAccountFactory().getMutableUserAccount(userAccount.getUniqueID());
Date now = new Date();
mutableUserAccount.setLastSuccessfulLogonDate(now);
mutableUserAccount.save();
mutableUserAccount.commit();
}catch (Exception e){}

Edited by: Tulio Vargas on Jan 19, 2012 6:58 PM

Binod_Thakur
Participant
0 Kudos

Hi,

I tried it's working, but not giving the proper result.

Since, we're calling Date class so for all the users, recent logon date is coming system corrent time