Quantcast
Channel: SCN : Popular Discussions - Web Dynpro Java
Viewing all articles
Browse latest Browse all 989

Get the last login date of portal users

$
0
0

i need to find out the last login date of all the portal users

 

i tried the below code

 

     IUserFactory iuf;

     ISearchResult isr;

     IUser user;

     String userid;

try{

     iuf = UMFactory.getUserFactory();

     isr = iuf.getUniqueIDs();

     int i=0;

     while(isr.hasNext())

     {

          userid = (String)isr.next();

          user = iuf.getUser(userid);

          IUserAccount[] IUF = user.getUserAccounts();

          Date lastLogin = IUF[0].getPreviousSuccessfulLogonDate();

 

      

          wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(user.getDisplayName()"------"lastLogin);

          i=i+1;

     }

     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(i+"");

}

 

its showing null for many of the users.

 

Please advise

 

AM


Viewing all articles
Browse latest Browse all 989

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>