Announcement Announcement Module
Collapse
No announcement yet.
how to delete users in acegi Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to delete users in acegi

    hi

    i have the folowing problem:
    when the administrator delets a user who is already authenticated the execution of a further request by this user causes the reauthentication to result in a continuous loop:

    Code:
    2005-08-03 17&#58;05&#58;24,564 WARN &#91;net.sf.acegisecurity.providers.dao.event.LoggerListener&#93; - <Authentication failed due to nonexistent username&#58; test; details&#58; net.sf.acegisecurity.ui.WebAuthenticationDetails@1dba9f9&#58; RemoteIpAddress&#58; 127.0.0.1; SessionId&#58; 9BE3BE66893F5CD0EE6C9CFE1A6720EA>
    2005-08-03 17&#58;05&#58;24,564 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache of type "org.jpox.cache.WeakRefCache" initialised>
    2005-08-03 17&#58;05&#58;24,574 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <SELECT `USER`.ACCOUNT_NON_EXPIRED,`USER`.ACCOUNT_NON_LOCKED,`USER`.CREDENTIALS_NON_EXPIRED,`USER`.EMAIL,`USER`.ENABLED,`USER`.FIRST_NAME,`USER`.ICQ,`USER`.LAST_NAME,`USER`.PASSWORD,`USER`.REGISTRATION_DATE,`USER`.USERNAME FROM `USER` WHERE &#40;`USER`.USERNAME = ?&#41;>
    2005-08-03 17&#58;05&#58;24,574 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <Execution Time = 0 ms>
    2005-08-03 17&#58;05&#58;24,574 WARN &#91;JPOX.RDBMS.SQL&#93; - <Object with id "test" not found !>
    org.springframework.orm.jdo.JdoObjectRetrievalFailureException&#58; No such database row; nested exception is javax.jdo.JDOObjectNotFoundException&#58; No such database row
    2005-08-03 17&#58;05&#58;24,574 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache cleared>
    2005-08-03 17&#58;05&#58;24,574 WARN &#91;net.sf.acegisecurity.providers.dao.event.LoggerListener&#93; - <Authentication failed due to nonexistent username&#58; test; details&#58; net.sf.acegisecurity.ui.WebAuthenticationDetails@1dba9f9&#58; RemoteIpAddress&#58; 127.0.0.1; SessionId&#58; 9BE3BE66893F5CD0EE6C9CFE1A6720EA>
    2005-08-03 17&#58;05&#58;24,584 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache of type "org.jpox.cache.WeakRefCache" initialised>
    2005-08-03 17&#58;05&#58;24,594 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <SELECT `USER`.ACCOUNT_NON_EXPIRED,`USER`.ACCOUNT_NON_LOCKED,`USER`.CREDENTIALS_NON_EXPIRED,`USER`.EMAIL,`USER`.ENABLED,`USER`.FIRST_NAME,`USER`.ICQ,`USER`.LAST_NAME,`USER`.PASSWORD,`USER`.REGISTRATION_DATE,`USER`.USERNAME FROM `USER` WHERE &#40;`USER`.USERNAME = ?&#41;>
    2005-08-03 17&#58;05&#58;24,594 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <Execution Time = 0 ms>
    2005-08-03 17&#58;05&#58;24,594 WARN &#91;JPOX.RDBMS.SQL&#93; - <Object with id "test" not found !>
    org.springframework.orm.jdo.JdoObjectRetrievalFailureException&#58; No such database row; nested exception is javax.jdo.JDOObjectNotFoundException&#58; No such database row
    2005-08-03 17&#58;05&#58;24,604 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache cleared>
    2005-08-03 17&#58;05&#58;24,604 WARN &#91;net.sf.acegisecurity.providers.dao.event.LoggerListener&#93; - <Authentication failed due to nonexistent username&#58; test; details&#58; net.sf.acegisecurity.ui.WebAuthenticationDetails@1dba9f9&#58; RemoteIpAddress&#58; 127.0.0.1; SessionId&#58; 9BE3BE66893F5CD0EE6C9CFE1A6720EA>
    2005-08-03 17&#58;05&#58;24,604 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache of type "org.jpox.cache.WeakRefCache" initialised>
    2005-08-03 17&#58;05&#58;24,614 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <SELECT `USER`.ACCOUNT_NON_EXPIRED,`USER`.ACCOUNT_NON_LOCKED,`USER`.CREDENTIALS_NON_EXPIRED,`USER`.EMAIL,`USER`.ENABLED,`USER`.FIRST_NAME,`USER`.ICQ,`USER`.LAST_NAME,`USER`.PASSWORD,`USER`.REGISTRATION_DATE,`USER`.USERNAME FROM `USER` WHERE &#40;`USER`.USERNAME = ?&#41;>
    2005-08-03 17&#58;05&#58;24,614 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <Execution Time = 0 ms>
    2005-08-03 17&#58;05&#58;24,614 WARN &#91;JPOX.RDBMS.SQL&#93; - <Object with id "test" not found !>
    org.springframework.orm.jdo.JdoObjectRetrievalFailureException&#58; No such database row; nested exception is javax.jdo.JDOObjectNotFoundException&#58; No such database row
    2005-08-03 17&#58;05&#58;24,614 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache cleared>
    2005-08-03 17&#58;05&#58;24,614 WARN &#91;net.sf.acegisecurity.providers.dao.event.LoggerListener&#93; - <Authentication failed due to nonexistent username&#58; test; details&#58; net.sf.acegisecurity.ui.WebAuthenticationDetails@1dba9f9&#58; RemoteIpAddress&#58; 127.0.0.1; SessionId&#58; 9BE3BE66893F5CD0EE6C9CFE1A6720EA>
    2005-08-03 17&#58;05&#58;24,634 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache of type "org.jpox.cache.WeakRefCache" initialised>
    2005-08-03 17&#58;05&#58;24,634 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <SELECT `USER`.ACCOUNT_NON_EXPIRED,`USER`.ACCOUNT_NON_LOCKED,`USER`.CREDENTIALS_NON_EXPIRED,`USER`.EMAIL,`USER`.ENABLED,`USER`.FIRST_NAME,`USER`.ICQ,`USER`.LAST_NAME,`USER`.PASSWORD,`USER`.REGISTRATION_DATE,`USER`.USERNAME FROM `USER` WHERE &#40;`USER`.USERNAME = ?&#41;>
    2005-08-03 17&#58;05&#58;24,634 DEBUG &#91;JPOX.RDBMS.SQL&#93; - <Execution Time = 0 ms>
    2005-08-03 17&#58;05&#58;24,634 WARN &#91;JPOX.RDBMS.SQL&#93; - <Object with id "test" not found !>
    org.springframework.orm.jdo.JdoObjectRetrievalFailureException&#58; No such database row; nested exception is javax.jdo.JDOObjectNotFoundException&#58; No such database row
    2005-08-03 17&#58;05&#58;24,644 INFO &#91;JPOX.Cache&#93; - <Level 1 Cache cleared>
    what can i do?

  • #2
    hi

    also changing the password causes this problem.
    in this case the editor edits its own profile so thought i could solve the problem by adding this line to my controllers handleRequest impl:

    Code:
    				String password = DigestUtils.md5Hex&#40;userForm.getPassword&#40;&#41;&#41;;
    				user.setPassword&#40;password&#41;;				
    				gallery.updateUser&#40;user&#41;;
    				&#40;&#40;User&#41; SecureContextUtils.getSecureContext&#40;&#41;.getAuthentication&#40;&#41;.getPrincipal&#40;&#41;&#41;.setPassword&#40;password&#41;;
    but the problem is not solved by that.

    does anybody know how to delete a user or edit a users password?

    Comment


    • #3
      You need to remove the user from any caches you have. Acegi's UserCache has a method called removeUserFromCache. Try that and see if it works. There are a lot of posts about changing passwords on users. Please do a search on the forum and you'll find them.

      Comment

      Working...
      X