on 02-17-2006 8:21 AM
Hi, I'm looking for a way to manage validto attribute form UME.
In this moment I'm able to obtain a IUser by the following code:
public String[] ReadUmeGroup(String anUser) {
Vector aResult = new Vector();
String[] array_result = null;
String aGroup = "";
IUser user = null;
try {
IUserFactory userFactory = UMFactory.getUserFactory();
IUserSearchFilter userSearchFilter = userFactory.getUserSearchFilter();
userSearchFilter.setUniqueName(anUser,ISearchAttribute.LIKE_OPERATOR,false);
ISearchResult searchResult = userFactory.searchUsers(userSearchFilter);
while (searchResult.hasNext()) {
user = userFactory.getUser(searchResult.next().toString());
if (user!=null) {
try { ....
How to obtain the validto information ?
How to use validto like search filter parameter ?
Thanks in advance for your colaboration.
Best regards
Gianfranco
Hi, we're changed the date (31/12/2500 --> 31/12/2007) but the result is always null.
Any other idea ?
Thanks
Gianfranco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for your answer.
I created this method
private String getValidToDate(String user) throws UMException {
String validToDate = null;
try {
IUserAccountFactory accFact = UMFactory.getUserAccountFactory();
IUserAccount userAcc = accFact.getUserAccount(user);
validToDate = userAcc.getValidToDate().toString();
}
catch (Exception e) {}
return validToDate;
}
and I obtained null value as with my method:
private String getValidToAttribute(IUser user) {
String[] validTo = null;
String[] namespace = null;
String aResult;
try {
namespace = user.getAttributeNamespaces();
if (namespace != null) {
validTo = user.getAttribute(namespace[0],"validto");
}
else {
aResult = "namespace = null";
}
}
catch (Exception e) {
}
if (validTo != null) {
aResult = validTo[0];
}
else {
aResult = "validTo = null " + "namespace[0] = " + namespace[0];
}
return aResult;
};
But in the UserManagement there is 31/12/2500.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gianfranco Bello ,
it is the default valid to date . during user creation , u have the option to set valid to date for the user.
in visual administrator , u can change 31/12/2500 , to particular valid to date.
Regarads
Kishor Gopinathan
Edited
-
HI ,
have u created new users through Visual Admin ?.
just try to create new users and assign ur own valid to date.
just try ....
Message was edited by: Kishor Gopinathan
Hi ,
IUserAccountFactory accFact = UMFactory.getUserAccountFactory();
IUserAccount userAcc = accFact.getUserAccount(<user id>);
Regards
Kishor Gopinathan
here from this userAcc , u will get the validto date ,,
then use your own logic to validate use..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gianfranco Bello ,
u can use the com.sap.security.api
Interface IUserAccount to get the user account details .
from this ,, u will get valid to date..
getValidToDate()
IUserAccount -- details.
-
Regards
Kishor Gopinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.