[ic] Userdb functions, docs vs. code

Jeff Boes jeff at endpoint.com
Tue Nov 3 15:39:53 UTC 2009

On this page:


the statement that the Values space is the default for the userdb tag is incorrect, I think. The code in UserDB.pm
(approx. line 263, v 5.6.1) is:

USERNAME  	=> $options{username} ||
                   $Vend::username ||
                   $CGI::values{mv_username} || '',
OLDPASS  	=> $options{oldpass} ||
                   $CGI::values{mv_password_old} || '',
PASSWORD  	=> $options{password}	||
                   $CGI::values{mv_password} || '',

thus it uses CGI space, at least for the "login" function.

I ran across this just today, when a fragment of code something like this failed:

  [update values]
  [value name="mv_username" set="[value email]" hide=1]
  [value name="mv_password" set="[value zip]" hide=1]
  [userdb function="login"]

failed. There aren't any CGI variables for mv_username and mv_password, so the login attempt doesn't have any inputs to
work with.

(Frankly, a more straightforward approach is better:

  [userdb function="login" username="[value email]" password="[value zip]"]

but that's beside the point here.)

Jeff Boes  <><
jeff at endpoint.com

More information about the interchange-users mailing list