Categories
Mastering Development

Error 1698: Access denied for user ‘root’@’localhost’ exit status 1 using GoLang

I’m making a REST API using GoLang and MySQL following this tutorial. This is my main_test.go file package main import ( "log" "os" "testing" ) var a App func TestMain(m *testing.M) { a = App{} a.Initialize("root", "admin", "rest_api_database") ensureTableExists() code := m.Run() clearTable() os.Exit(code) } func ensureTableExists() { if _, err := a.DB.Exec(tableCreationQuery); err != […]

Categories
Mastering Development

Cannot send Email via Microsoft Exchange WebService [duplicate]

I could not figure this out, my code is as below but I’m getting an exception: Code: var username = "myusername"; var password = "mypassword"; var domain = "mydomain"; var host = "https://mail.mydomain.com"; //Uses HTTPS, not HTTP var to = "mypersonalemail@gmail.com"; ExchangeService exchangeService1 = new ExchangeService(ExchangeVersion.Exchange2013) { Credentials = new NetworkCredential(username, password, domain), Url = […]

Categories
User Help

Limit user visibility on database only to queries with its username [closed]

I’m designing a multi-user application. This application uses a database (a PostgreSQL one). In the database there’s a user table and other tables with foreign keys connected to it, as usual. So the database contains data of all users. Since the application is a desktop one, I need to give the data for connecting to […]

Categories
User Help Web Pro

Can I securely allow users of my site to change their email address if they forgot their password and no longer have access to the old email address?

How do I securely allow users to change their emails if they lose access to the original email? Do I need 2 factor? It’s a social media site coded in nodejs where I have their username, password, and email address. Users sometimes want to change their emails because they lost their password to their old […]

Categories
Mastering Development

PHP & MySQL : Online Quiz Website ( problem with storing the score in the Database)

I would like to store the score into a database i have created but i keep getting an error and it only stores the name , id and email here’s the code that stores the data into the database. PHP Quiz Result $totalCorrect / 10 correct”; $id=$_GET[‘id’]; $name=$_GET[‘name’]; $email=$_GET[’email’]; $totalCorrect=$_GET[‘results’]; $servername = “localhost:3308”; $username = […]

Categories
Mastering Development

SOLVED passport.js req.user is returning: ‘Promise { false }’ – How do I get the current sessions’ username?

FIGURED OUT THE PROBLEM SOLUTION: First of all, deserializeUser should have been asyncronized. I needed to await for the getUserFromId result to return because since I’m retrieving there result from a database, it will return a promise. Second, I needed to pass the UserCollection model to getUserFromId – if there is no model to look […]

Categories
Mastering Development System & Network

How to add crdentionals to bitlocker script

I’m trying to run this script. $BLinfo = Get-Bitlockervolume if ($BLinfo.mountpoint -eq ‘c:’ -and $BLinfo.ProtectionStatus -eq ‘on’ ){ Out-File c:\yes.log } if ($BLinfo.mountpoint -eq ‘c:’ -and $BLinfo.ProtectionStatus -eq ‘off’ ){ manage-bde.exe -protectors -add c: -rp -Credential $credentials manage-bde.exe -on c: -Credential $credentials Out-File c:\no.log } I have to run it as admin Is it possible […]

Categories
CMS Joomla Mastering Development

writing my own code to import users

I need to bunch create lots of users and I have their emails and some profile infos like phone number and address. These infos are in a google sheet, I just need to generate usernames and set intitial passwords for them before sending login infos to their email. Security is not a concern. How can […]

Categories
Mastering Development

User entries not updating in database

I am using postman to send a request and I see Success message but in the database, it’s not updated at all. PostMAN request database Snap shot update services object: from this file I have used a database query to insert data in the database and set callBack funtion const pool = require(‘../../config/database’) module.exports = […]

Categories
CMS Joomla Mastering Development

Remove username from registration

I want to keep the registration process as simple as possible for my users, like a lot of modern websites do. I want there to be only 3 fields to fill out when creating new accounts: Email, Password, Repeat password. It seems to me there is no option to remove the mandatory username field from […]