Hi Tharik, Refer to the following mail thread, "[Dev] PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername() returns 'null'" http://mail.wso2.org/mailarchive/dev/2013-January/014372.html
Thanks On Tue, May 12, 2015 at 9:20 AM, Tharik Kanaka <[email protected]> wrote: > Hi All, > > I want to get logged in username and password inside one of my carbon > component written for WSO2 CEP product. I used following two methods to get > username from carbon context but both returned null. But getTenantId > returns -1234 for admin user with no issue. Is there alternative way to get > username? > > PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername() > > CarbonContext.getThreadLocalCarbonContext().getUsername() > > Thanks, > -- > > *Tharik Kanaka* | Associate Software Engineer > > WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka > > Email: [email protected] | Web: www.wso2.com > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thusitha Dayaratne Software Engineer WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com About http://about.me/thusithathilina
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
