[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] updating data without a form?
> Yes, the user is logged in.
>
> I tried just "[tag flag write]userdb[/tag][userdb function=save]", but I'm a
> bit surprised why you wanted me to try this. The whole point of the
> exercise was to change the value of the field "password" to "secret".
>
> [tag flag write]userdb[/tag][userdb function=save] produced one '1' on the
> page, and generated no errors. Of course it didn't actually save any
> values.
>
> To address Rene's question, I am looking at mySql data through mySql itself.
>
To change the logged-in user's password from "whatever" to "secret"
you can do the following:
[userdb function="change_pass"
oldpass="whatever"
password="secret"
verify="secret"
]
Of course, you'll need to know that the current password is "whatever"
before you can do this. Perhaps you should not be doing it this way;
Create a form and get the user to enter their current and new password.
I can't think of a situation where you'd need to do this without using
a form.
By the way, the 1 on the page is the success code, you can hide it with:
[tmp result][userdb ...][/tmp]
Or you can us it with:
[if type="explicit" compare="[userdb ...]"]
Success
[else]
Failure
[/else]
[/if]
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/