Hi Brydon,
Finally I am able to relate myself with someone with a similar problem.
I am dying to know what have you done to make your code work. I have
attached my piece of code and this file resides in
\webapps\NewtestApp\WEB-INF\src\java\org\bigtec\NewtestApp\modules\actions
directory of the Apache Tomcat 4.0
I have also tried implementing the changes that you had suggested, but in
vain. It would be great assistance if can help me solve this issue.
[ I have made the appropriate changes in the TurbineResources.properties
file too]
Thanks
Vijay Kumar Chintala
The following is the code extract
public class mylogin extends SecureAction
{
public void doPerform(RunData data)
throws Exception
{
if(data.getUserFromSession().getUserName() != null)
return;
String username = data.getParameters().getString("username", "");
String password = data.getParameters().getString("password", "");
User user = null;
try
{
user = TurbineSecurity.getAuthenticatedUser(username, password);
data.setUser(user);
user.setHasLoggedIn(new Boolean(true));
user.updateLastLogin();
data.save();
}
catch(TurbineSecurityException e)
{
if(e instanceof DataBackendException)
Log.error(e);
data.setMessage(TurbineResources.getString("login.error"));
data.setUser(TurbineSecurity.getAnonymousUser());
String loginTemplate =
TurbineResources.getString("template.login");
if(loginTemplate != null && loginTemplate.length() > 0)
data.setScreenTemplate(loginTemplate);
else
data.setScreen(TurbineResources.getString("screen.login"));
}
}
public mylogin()
{
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>