Easy-HotSpot icon indicating copy to clipboard operation
Easy-HotSpot copied to clipboard

Error on user creatin during first login

Open BrixSat opened this issue 2 years ago • 1 comments

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 avatar Dec 22 '21 15:12 BrixSat

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(),'[email protected]','admin','','')"); $stmt->execute(array(':username' => 'admin', ':password' => $password, ':level' => 1)); }

BrixSat avatar Dec 22 '21 15:12 BrixSat