Merge pull request #455 from nickago/MM-1604

MM-1604 Changed 1 hour expire time to 30 days
Этот коммит содержится в:
Corey Hulen
2015-08-24 10:43:45 -07:00
родитель 9280dfb935 ae3f9cdb0a
Коммит cd3f316697

Просмотреть файл

@@ -4,18 +4,19 @@
package web
import (
l4g "code.google.com/p/log4go"
"fmt"
"html/template"
"net/http"
"strconv"
"strings"
l4g "code.google.com/p/log4go"
"github.com/gorilla/mux"
"github.com/mattermost/platform/api"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
"github.com/mssola/user_agent"
"gopkg.in/fsnotify.v1"
"html/template"
"net/http"
"strconv"
"strings"
)
var Templates *template.Template
@@ -214,7 +215,7 @@ func signupTeamComplete(c *api.Context, w http.ResponseWriter, r *http.Request)
props := model.MapFromJson(strings.NewReader(data))
t, err := strconv.ParseInt(props["time"], 10, 64)
if err != nil || model.GetMillis()-t > 1000*60*60 { // one hour
if err != nil || model.GetMillis()-t > 1000*60*60*24*30 { // 30 days
c.Err = model.NewAppError("signupTeamComplete", "The signup link has expired", "")
return
}