mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
sign up almost fully working
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
- create function that parses DB every 15 minutes and clears out junk
|
||||
|
||||
- Require user to confirm email before purchasing
|
||||
|
||||
- Create password changing endpoint (to reset forgotten pwd)
|
||||
- Add Admin profile (page to change account settings per person like changing pwd)
|
||||
|
||||
|
||||
@@ -50,7 +50,11 @@
|
||||
res.json().then( data => {
|
||||
if ( data.status ) {
|
||||
this.accountData = data.data;
|
||||
console.log( data.data );
|
||||
if ( !data.data.mail_confirmed ) {
|
||||
setTimeout( () => {
|
||||
this.$refs.notification.createNotification( 'Your account is unverified. Please confirm your email using the link we have sent to your email!', 20, 'info', 'normal' );
|
||||
}, 1000 );
|
||||
}
|
||||
} else {
|
||||
this.userStore.setUserAuth( false );
|
||||
this.userStore.setUser2fa( false );
|
||||
|
||||
@@ -108,9 +108,13 @@
|
||||
console.log( res );
|
||||
res.text().then( status => {
|
||||
if ( status === 'ok' ) {
|
||||
this.userStore.setUserAuth( true );
|
||||
this.$router.push( sessionStorage.getItem( 'redirect' ) ?? '/account' );
|
||||
sessionStorage.removeItem( 'redirect' );
|
||||
this.$refs.notification.cancelNotification( progress );
|
||||
this.$refs.notification.createNotification( 'Signed up successfully. We have sent you an email. Please confirm it to finish sign-up', 5, 'ok', 'normal' );
|
||||
setTimeout( () => {
|
||||
this.userStore.setUserAuth( true );
|
||||
this.$router.push( sessionStorage.getItem( 'redirect' ) ?? '/account' );
|
||||
sessionStorage.removeItem( 'redirect' );
|
||||
}, 5000 );
|
||||
} else if ( status === 'exists' ) {
|
||||
this.$refs.notification.cancelNotification( progress );
|
||||
this.$refs.notification.createNotification( 'An account with this email address already exists. Please log in using it.', 5, 'error', 'normal' );
|
||||
|
||||
Reference in New Issue
Block a user