[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] [userdb function=login]


Gert van der Spoel ha scritto:
Marco Mescoli

Kevin Walsh ha scritto:
Marco Mescoli <suppressed> wrote:
After this rows

[seti]
  [cgi name=mv_username set='[cgi username]']
  [cgi name=mv_password set='[cgi pw]']
  [userdb function=login]
[/seti]

i can read [data session username] but i cannot browse
members_only=1 pages
The above didn't log you in.

Set your username and password using the [value] tag or use the
[userdb]
tag's "cgi" parameter.  See here:


http://www.interchange.rtfm.info/icdocs/Interchange_user_database.html#
login
    http://www.interchange.rtfm.info/icdocs/tags/userdb.html#cgi

Also, you didn't name the [seti] scratchpad variable.  [tmp] would
be better than [seti] for this or, better still, user the [userdb]
tag's "hide" parameter:

    http://www.interchange.rtfm.info/icdocs/tags/userdb.html#hide

The [cgi] and [value] tags also have a "hide" parameter.  I'm sure
that you can guess the link to the docs for those. :-)

By the way, you can cut the whole thing down to size with the
following:

    [userdb function="login" usernme="[cgi username]" password="[cgi
pw]" hide=1]
Hmmm - I wonder whether it's a bug that [data session username] got
set using your example.  I'll test that for myself when I get some
time.
I try your code (ic 4.9.8) but the results are the same.

[seti]
   [cgi name=mv_username set='[cgi username]']
   [cgi name=mv_password set='[cgi pw]']
   [userdb function=login]
[/seti]

and

[userdb function="login" username="[cgi username]" password="[cgi pw]"
hide=1]

make correct user login.
In both ways [data session username] display logged user and [data
session logged_in] is 1 but i cannot browse members_only pages.
At this point i think that the problem is not the way to do login but
my
code that test session and scratch vars.

Now my bug has short life :-)

Is it in the standard pages that you are trying to accomplish this or in a
new page you created.
Perhaps you can copy the complete code of the page you are trying to get
into as member to http://paste.me.uk/ .. I'll have a look then.

CU,

Gert
----- After many attempts seems solved
The problem was that the my login function was made from VPN connection (from private ip 192.168....) and the successive browsing of the members_only pages was made from normal connection (from public ip) and in this way session id must change.

In summer i love to sleep :-)

Marco Mescoli
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.