Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
5c7f9d55
Commit
5c7f9d55
authored
Jul 29, 2019
by
Rick Carback
Browse files
Options
Downloads
Patches
Plain Diff
Set the user e-mail appropriately
parent
b9d48e00
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/client.go
+2
-4
2 additions, 4 deletions
api/client.go
cmd/root.go
+1
-1
1 addition, 1 deletion
cmd/root.go
user/session.go
+3
-2
3 additions, 2 deletions
user/session.go
with
6 additions
and
7 deletions
api/client.go
+
2
−
4
View file @
5c7f9d55
...
@@ -237,10 +237,6 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
...
@@ -237,10 +237,6 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
u
.
Nick
=
nick
u
.
Nick
=
nick
}
}
if
email
!=
""
{
u
.
Email
=
email
}
nodekeys
,
successKeys
:=
user
.
Users
.
LookupKeys
(
u
.
User
)
nodekeys
,
successKeys
:=
user
.
Users
.
LookupKeys
(
u
.
User
)
if
!
successKeys
{
if
!
successKeys
{
...
@@ -403,6 +399,8 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
...
@@ -403,6 +399,8 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
user
.
Users
.
UpsertUser
(
u
)
user
.
Users
.
UpsertUser
(
u
)
}
}
u
.
Email
=
email
// Create the user session
// Create the user session
nus
:=
user
.
NewSession
(
cl
.
storage
,
u
,
nk
,
publicKey
,
privateKey
,
cmixGrp
,
e2eGrp
)
nus
:=
user
.
NewSession
(
cl
.
storage
,
u
,
nk
,
publicKey
,
privateKey
,
cmixGrp
,
e2eGrp
)
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
1
−
1
View file @
5c7f9d55
...
@@ -186,7 +186,7 @@ func sessionInitialization() (*id.User, *api.Client) {
...
@@ -186,7 +186,7 @@ func sessionInitialization() (*id.User, *api.Client) {
// doesn't support non pre canned users
// doesn't support non pre canned users
uid
=
id
.
NewUserFromUints
(
&
[
4
]
uint64
{
0
,
0
,
0
,
userId
})
uid
=
id
.
NewUserFromUints
(
&
[
4
]
uint64
{
0
,
0
,
0
,
userId
})
// clear userEmail if it was defined, since login was previously done
// clear userEmail if it was defined, since login was previously done
userEmail
=
""
//
userEmail = ""
globals
.
Log
.
INFO
.
Printf
(
"Skipped Registration, user: %v"
,
uid
)
globals
.
Log
.
INFO
.
Printf
(
"Skipped Registration, user: %v"
,
uid
)
}
}
...
...
This diff is collapsed.
Click to expand it.
user/session.go
+
3
−
2
View file @
5c7f9d55
...
@@ -237,6 +237,7 @@ func (s *SessionObj) GetCurrentUser() (currentUser *User) {
...
@@ -237,6 +237,7 @@ func (s *SessionObj) GetCurrentUser() (currentUser *User) {
currentUser
=
&
User
{
currentUser
=
&
User
{
User
:
s
.
CurrentUser
.
User
,
User
:
s
.
CurrentUser
.
User
,
Nick
:
s
.
CurrentUser
.
Nick
,
Nick
:
s
.
CurrentUser
.
Nick
,
Email
:
s
.
CurrentUser
.
Email
,
}
}
}
}
return
currentUser
return
currentUser
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment