1
2(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6
7ga('create', 'UA-XXXXX-Y', 'auto');
8ga('send', 'pageview');
1 update_password( password, user_token ) {
2 this.mongodb.collection( "users" ).updateOne( { [`password_recovery_tokens.${user_token}`]: {$exists: true} }, {$set : { password : crypto.createHash('sha256').update(password).digest('base64') } } )
3 }
4
1 case '/local/forgot':
2 if( req.method==='POST' ) {
3 const email=req.body.email.toLowerCase();
4 return server.get_user_by_email( email ).then ( p => {
5 if ( p ) {
6 server.push_token( p, common.get_uuid() );
7 return res.redirect(`/auth/local/email_sent?email=${email}`);
8 }
9 else
10
11 return res.redirect(`/auth/local/forgot`);
12 });
13 }
14
1 update_password( password, user_token ) {
2 this.mongodb.collection( "users" ).updateOne( { [`password_recovery_tokens.${user_token}`]: {$exists: true} }, {$set : { password : crypto.createHash('sha256').update(password).digest('base64') } } )
3 }
4
1var acc = document.getElementsByClassName("accordion");
2var i;
3
4for (i = 0; i < acc.length; i++) {
5 acc[i].addEventListener("click", function() {
6 this.classList.toggle("active");
7 var panel = this.nextElementSibling;
8 if (panel.style.display === "block") {
9 panel.style.display = "none";
10 } else {
11 panel.style.display = "block";
12 }
13 });
14}
1 case '/local/forgot':
2 if( req.method==='POST' ) {
3 const email=req.body.email.toLowerCase();
4 return server.get_user_by_email( email ).then ( p => {
5 if ( p ) {
6 server.push_token( p, common.get_uuid() );
7 return res.redirect(`/auth/local/email_sent?email=${email}`);
8 }
9 else
10
11 return res.redirect(`/auth/local/forgot`);
12 });
13 }
14