2 Replies Latest reply on Feb 22, 2008 1:38 AM by arun.988@gmail.com

    lock username

    arun.988@gmail.com

      how can i lock the user if he unable to logins succefully for more than 5 times continuously

        • Re: lock username

          Clearspace does not have that functionality built in. You might be able to add it by writing a custom user authenticator. Also, if you are using LDAP for authentication, the LDAP system might have an account lock out policy.

           

          Regards,

           

          Seth

            • Re: lock username
              arun.988@gmail.com

               

              Hi seth

               

               

              I followed the below approach is it ok.

               

               

               

               

               

                     if ( LoginCount.getuserList().get(username) == null  )  {

                                       LoginCount.getuserList().put(username,new Integer(1));

                              } else {

                                    Integer intValue = (Integer) LoginCount.getuserList().get(username);

                                    int k = intValue.intValue();

                                    if ( k > 5){

                                          System.out.println ( " send mail to reset the value


              >");

                                          // i guess we have to send the mail

               

                                          LoginCount.getuserList().remove(username);

                                    } else {

                                        ++k;

                                        LoginCount.getuserList().put(username,new Integer(k));

                                      }

                                 }

              I added this code in LoginAction's authenticate() method .

               

               

              pls let me know will this code work

               

               

              Regards

               

               

              arun