cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with AuthenticationUtil class

alex888
Champ in-the-making
Champ in-the-making
Hi all,

I've been working several weeks in a project using Alfresco 3 beta. We develop a new dashlet where we need to detect the Alfresco user login, the next piece of code was working properly up to now:



import org.alfresco.repo.security.authentication.AuthenticationUtil;

….

String userLogin = AuthenticationUtil.   getCurrentRealUserName() ;


Now, I tested my code using the new Alfresco 3a Stable version, and the method getCurrentRealUserName is not recognized (the typical exception you get when a method is not present in a class, but I can't post the exact message right now).
Please ,does anyone know an alternative way to do this?, what has been changed from old version to new one?.

Many thanks in advance and kind regards.
1 REPLY 1

pmonks
Star Contributor
Star Contributor
This API has changed several times recently, which can cause these kinds of issues.  The best way to resolve these kinds of issue is to ensure you recompile your Java code using the exact same version of the Alfresco JARs as you're installing your code into.

Cheers,
Peter