Skip to content
Snippets Groups Projects
Commit 7e66ce6d authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

fixed the cosmetic issues with precanned userID

parent d0d75a98
No related branches found
No related tags found
No related merge requests found
...@@ -227,10 +227,10 @@ func sessionInitialization() (*id.ID, string, *api.Client) { ...@@ -227,10 +227,10 @@ func sessionInitialization() (*id.ID, string, *api.Client) {
globals.Log.INFO.Printf("Attempting to register with code %s...", regCode) globals.Log.INFO.Printf("Attempting to register with code %s...", regCode)
errRegister := fmt.Errorf("") errRegister := fmt.Errorf("")
uid = client.GetCurrentUser()
//Attempt to register user with same keys until a success occurs //Attempt to register user with same keys until a success occurs
for errRegister != nil { for errRegister != nil {
_, errRegister = client.RegisterWithPermissioning(userId != 0, regCode) _, errRegister = client.RegisterWithPermissioning(precanned, regCode)
if errRegister != nil { if errRegister != nil {
globals.Log.FATAL.Panicf("Could Not Register User: %s", globals.Log.FATAL.Panicf("Could Not Register User: %s",
errRegister.Error()) errRegister.Error())
...@@ -243,6 +243,8 @@ func sessionInitialization() (*id.ID, string, *api.Client) { ...@@ -243,6 +243,8 @@ func sessionInitialization() (*id.ID, string, *api.Client) {
err.Error()) err.Error())
} }
uid = client.GetCurrentUser()
userbase64 := base64.StdEncoding.EncodeToString(uid[:]) userbase64 := base64.StdEncoding.EncodeToString(uid[:])
globals.Log.INFO.Printf("Registered as user (uid, the var) %v", uid) globals.Log.INFO.Printf("Registered as user (uid, the var) %v", uid)
globals.Log.INFO.Printf("Registered as user (userID, the global) %v", userId) globals.Log.INFO.Printf("Registered as user (userID, the global) %v", userId)
......
...@@ -4,7 +4,7 @@ go 1.13 ...@@ -4,7 +4,7 @@ go 1.13
require ( require (
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.4.1 github.com/golang/protobuf v1.4.2
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/pelletier/go-toml v1.6.0 // indirect github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
...@@ -15,9 +15,9 @@ require ( ...@@ -15,9 +15,9 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2 github.com/spf13/viper v1.6.2
gitlab.com/elixxir/comms v0.0.0-20200514191231-70cadf8a289a gitlab.com/elixxir/comms v0.0.0-20200515202732-257effa3b6c1
gitlab.com/elixxir/crypto v0.0.0-20200514211323-de119c132b78 gitlab.com/elixxir/crypto v0.0.0-20200515201932-119227ae286c
gitlab.com/elixxir/primitives v0.0.0-20200514181428-14736275e533 gitlab.com/elixxir/primitives v0.0.0-20200515202141-16fa8236f167
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
gopkg.in/ini.v1 v1.52.0 // indirect gopkg.in/ini.v1 v1.52.0 // indirect
) )
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment