6.0.0-git
2019-03-19

[#4964] Passwd fails to get a the instance of Driver
Summary Passwd fails to get a the instance of Driver
Queue Passwd
Queue Version 3.0
Type Bug
State Resolved
Priority 2. Medium
Owners
Requester bertoncello (at) internet24 (dot) de
Created 2007-02-01 (4429 days ago)
Due
Updated 2007-02-02 (4428 days ago)
Assigned
Resolved 2007-02-02 (4428 days ago)
Milestone
Patch No

History
2007-02-02 03:37:43 Chuck Hagenbuch Comment #3
State ⇒ Resolved
Reply to this comment
This has already been fixed in both HEAD and the FW_3 branch.
2007-02-01 19:05:25 wcravens (at) cortex-it (dot) com Comment #2 Reply to this comment
I concur with this bug.  Although I am using a mysql backend the setup 
was very similar and symptoms identical.  I can also confirm that the 
fix works.
2007-02-01 10:45:02 bertoncello (at) internet24 (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Passwd fails to get a the instance of Driver
Queue ⇒ Passwd
Reply to this comment
I configured a Backend as sql (Postgres) with this data:



$backends['cf'] = array (

     'name' => 'CF',

     'preferred' => '',

     'password policy' => array(

         'minLength' => 3,

         'maxLength' => 24,

         'maxSpace' => 0,

         'minUpper' => 0,

         'minLower' => 0,

         'minNumeric' => 0,

         'minSymbols' => 0

     ),

     'driver' => 'sql',

     'params' => array(

         'phptype'    => 'pgsql',

         'hostspec'   => 'myserver.de',

         'protocol'   => 'tcp',

         'username'   => 'postgres',

         'password'   => 'mypassword',

         'encryption' => 'plain',

         'database'   => 'config',

         'table'      => 'account',

         'user_col'   => 'accountname',

         'pass_col'   => 'passwd',

         'show_encryption' => false

         // The following two settings allow you to specify custom queries for

         // lookup and modify functions if special functions need to be

         // performed.  In places where a username or a password needs to be

         // used, refer to this placeholder reference:

         //    %u -> gets substituted with the user

         //    %p -> gets substituted with the plaintext password

         //    %e -> gets substituted with the encrypted password

         //

         // 'query_lookup' => 'SELECT user_pass FROM horde_users WHERE 
user_uid = %u',

         // 'query_modify' => 'UPDATE horde_users SET user_pass = %e 
WHERE user_uid = %u',

     )

);



When the user tries to change his password, he gets this error:



Notice: Only variable references should be returned by reference in 
/usr/share/horde3/passwd/lib/Driver.php on line 110



I resolved this error by changing the line 110 of Driver.php as follow:



             $ret = &new $class($params);

             return $ret;

//            return $ret = &new $class($params);



Then, it runs without problem...

I hope, this change will appears by the next release... :)

Saved Queries