Role And User Level security in Ssas CUBE

Dear Friends

I am using fact and user and role tables.

For Example, I ll get user like this custom data
STRTOMEMBER("[User].[User Name].&[" + CUSTOMDATA() + "]")).

I need role and user using custom data functions.