[Tickets #10228] Re: Add API methods to reset cached credentials inside applications

bugs at horde.org bugs at horde.org
Sun Dec 18 19:12:27 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10228
------------------------------------------------------------------------------
  Ticket             | 10228
  Updated By         | azurit at pobox.sk
  Summary            | Add API methods to reset cached credentials inside
                     | applications
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Enhancement
  State              | Resolved
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             | Jan Schneider
------------------------------------------------------------------------------


azurit at pobox.sk (2011-12-18 19:12) wrote:

Sending patch which works for me:

File: passwd/lib/Passwd.php
Function (at the end of file): resetCredentials
Code (i added 3 lines which starts by '$imp_imap'):

     static public function resetCredentials($old_password, $new_password)
     {
         if ($GLOBALS['registry']->getAuthCredential('password') ==  
$old_password) {
             $GLOBALS['registry']->setAuthCredential('password',  
$new_password);

             $imp_imap =  
$GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create();
             $imp_imap->ob = NULL;
              
$imp_imap->createImapObject($GLOBALS['registry']->getAuth(),  
$new_password, IMP_Auth::getAutoLoginServer());
         }
     }


Jan, what do you think ?





More information about the bugs mailing list