Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
db654088
Commit
db654088
authored
Sep 26, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update send verification mail
parent
4d181631
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
screens/Public/RegisterScreen.js
+11
-5
No files found.
screens/Public/RegisterScreen.js
View file @
db654088
...
...
@@ -43,18 +43,24 @@ class RegisterScreen extends Component {
createAccount
=
async
values
=>
{
const
userData
=
{
firstName
:
values
.
firstName
,
lastName
:
values
.
lastName
,
phoneNumber
:
values
.
phoneno
};
try
{
const
reg
=
app
.
auth
()
app
.
auth
()
.
createUserWithEmailAndPassword
(
values
.
email
,
values
.
password
)
.
then
(
async
value
=>
{
this
.
sendEmail
();
await
this
.
props
.
getCurrentUser
(
value
);
await
this
.
props
.
updateUser
(
userData
);
});
if
(
reg
)
{
app
.
auth
().
signOut
();
this
.
props
.
navigation
.
navigate
(
'Success'
);
}
catch
(
error
)
{
alert
(
error
);
}
};
sendEmail
=
async
()
=>
{
const
user
=
app
.
auth
().
currentUser
;
try
{
await
user
.
sendEmailVerification
().
then
(()
=>
{
app
.
auth
().
signOut
();
});
}
catch
(
error
)
{
alert
(
error
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment