> Looks like one of your columns might be null that shouldn't be null?  Do
> you
> have the users in the table?  Was there an ora error?
> 
        the columns of my "Turbine_User"-table are filled correctly. there
was no ora-error.

        it could be that my "LoginUser.java"-action is wrong. turbine
allocates an own class named "LoginUser.java". do i have to put this class
in my modules/action-folder or is it adequate to leave the class only in the
turbine-folder?

        the LoginUser.java looks like:

        mport org.apache.commons.configuration.Configuration;
        import org.apache.commons.lang.StringUtils;
        import org.apache.commons.logging.Log;
        import org.apache.commons.logging.LogFactory;
        import org.apache.turbine.Turbine;
        import org.apache.turbine.TurbineConstants;
        import org.apache.turbine.modules.actions.VelocityAction;
        import org.apache.turbine.om.security.User;
        import org.apache.turbine.services.security.TurbineSecurity;
        import org.apache.turbine.util.RunData;
        import org.apache.turbine.util.security.DataBackendException;
        import org.apache.turbine.util.security.TurbineSecurityException;
        import org.apache.velocity.context.Context;

        public class LoginUser2 extends VelocityAction
        {
            public static final String USERNAME = "username";
            public static final String PASSWORD = "password";

            private static Log log = LogFactory.getLog(LoginUser2.class);

            public void doPerform(RunData data, Context context)
                    throws TurbineSecurityException
            {
                String username = data.getParameters().getString(USERNAME,
"");
                String password = data.getParameters().getString(PASSWORD,
"");
                
                if (StringUtils.isEmpty(username))
                {
                    return;
                }

                try
                {
                    User user =
TurbineSecurity.getAuthenticatedUser(username, password);
                    data.setUser(user);
                    user.setHasLoggedIn(Boolean.TRUE);
                    user.updateLastLogin();
                    data.save();
                }
                catch (Exception e)
                {
                    Configuration conf = Turbine.getConfiguration();

                    if (e instanceof DataBackendException)
                    {
                        log.error(e);
                    }

        
data.setMessage(conf.getString(TurbineConstants.LOGIN_ERROR, ""));
                    data.setUser (TurbineSecurity.getAnonymousUser());

                    String loginTemplate = conf.getString(
                            TurbineConstants.TEMPLATE_LOGIN);

                    if (StringUtils.isNotEmpty(loginTemplate))
                    {
                        data.setScreenTemplate(loginTemplate);
                    }
                    else
                    {
        
data.setScreen(conf.getString(TurbineConstants.SCREEN_LOGIN));
                    }
                }
            }
        }

        the fault happens in the highlighted the row. username and password
are 100% correct.

        i have still no idea... :(
 
*  *  *  *  *  *  D I S C L A I M E R  *  *  *  *  *  *  *
 
This message is confidential and intended for the named addressee(s) only.
If you are not the intended recipient, please contact the sender by E-Mail
return and then delete this message from your system. You should not copy
or use it or disclose its contents to any other person.
 
If any part of this message is illegible or if you suspect that the message
may have been intercepted or amended, please contact the sender.
Dresdner Bank Luxembourg S.A. cannot accept any responsibility for the
accuracy or completeness of this message without further investigation.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to