Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on user creatin during first login #7

Open
BrixSat opened this issue Dec 22, 2021 · 1 comment
Open

Error on user creatin during first login #7

BrixSat opened this issue Dec 22, 2021 · 1 comment

Comments

@BrixSat
Copy link

BrixSat commented Dec 22, 2021

During first login
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1364 Field 'email' doesn't have a default value in /var/www/html/Easy-HotSpot/login.php:67 Stack trace: #0 /var/www/html/Easy-HotSpot/login.php(67): PDOStatement->execute() #1 {main} thrown in /var/www/html/Easy-HotSpot/login.php on line 67

@BrixSat
Copy link
Author

BrixSat commented Dec 22, 2021

Solution: arround line 65
if( $count == 0 ) {
$password = sha1('admin');
$stmt = $DB_con->prepare("insert into hotspot_users (date_added, firstname, username, password, user_level, status, user_group, created_at, email, lastname,image_path,thumb_path)
values(CURDATE(), 'Administrator', :username, :password, :level, 'Active', 1, NOW(),'admin@local.host','admin','','')");
$stmt->execute(array(':username' => 'admin', ':password' => $password, ':level' => 1));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant