action_signin.go 595 B

123456789101112131415161718192021222324252627282930
  1. package actions
  2. func (this *Action) Action_signin() {
  3. if dbe := this.use_database(); dbe != nil {
  4. this.msg_error(dbe.Error())
  5. return
  6. } else {
  7. defer this.db.Close()
  8. }
  9. pf_email := this.wrapper.R.FormValue("email")
  10. pf_password := this.wrapper.R.FormValue("password")
  11. if pf_email == "" {
  12. this.msg_error(`Please specify user email`)
  13. return
  14. }
  15. if !this.is_valid_email(pf_email) {
  16. this.msg_error(`Please specify correct user email`)
  17. return
  18. }
  19. if pf_password == "" {
  20. this.msg_error(`Please specify user password`)
  21. return
  22. }
  23. //this.msg_success(`Hello from web server`)
  24. }