register return error instead of bool
This commit is contained in:
@@ -40,8 +40,8 @@ func main() {
|
||||
scsusers.Init(db, "test", "Example Test", "nobody@nowhere.com", "localhost:25", true)
|
||||
a:=scsusers.UsernameAvailable("testuser")
|
||||
fmt.Printf("Initial test of username available: %v\n", a)
|
||||
a=scsusers.Register("testuser", email, "127.0.0.1")
|
||||
fmt.Printf("Register returned %v\n",a)
|
||||
err=scsusers.Register("testuser", email, "127.0.0.1")
|
||||
fmt.Printf("Register returned %v\n",err)
|
||||
fmt.Printf("Attempt to log in with invalid username returned %v\n", scsusers.Login("baduser", "badpass"))
|
||||
fmt.Printf("Enter code from email:")
|
||||
var code string
|
||||
|
Reference in New Issue
Block a user