mirror of
https://github.com/volatiletech/authboss.git
synced 2025-07-15 01:24:33 +02:00
Update Readme.
This commit is contained in:
@ -113,14 +113,14 @@ user struct, nil | The user is logged in.
|
|||||||
Because on password reset various cleanings need to happen (for example Remember Me tokens
|
Because on password reset various cleanings need to happen (for example Remember Me tokens
|
||||||
should all be deleted) setting the user's password yourself is not a good idea.
|
should all be deleted) setting the user's password yourself is not a good idea.
|
||||||
|
|
||||||
Authboss has the UpdatePassword method for you to use. Please consult it's documentation
|
Authboss has the [UpdatePassword](http://godoc.org/gopkg.in/authboss.v0#UpdatePassword) method for you to use. Please consult it's documentation
|
||||||
for a thorough explanation of each parameter.
|
for a thorough explanation of each parameter and usage.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
func UpdatePassword(w http.ResponseWriter, r *http.Request, ptPassword string, user interface{}, updater func() error) error
|
func UpdatePassword(w http.ResponseWriter, r *http.Request, ptPassword string, user interface{}, updater func() error) error
|
||||||
```
|
```
|
||||||
|
|
||||||
Please read it's documentation as it's quite thorough, an example usage might be:
|
An example usage might be:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
myUserSave := func() error {
|
myUserSave := func() error {
|
||||||
|
Reference in New Issue
Block a user