Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/class/ocpp.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,14 @@ public function getAuth($_idTag = null): array {

unset($auths[$_idTag]['name'], $auths[$_idTag]['concurrentTx']);
return $auths[$_idTag];
} else if (config::byKey('autoadduser', __CLASS__, false)) {
$file = __DIR__ . '/../../data/' . $groupId . '.csv';
if (is_file($file) && ($csv = fopen($file, 'a+')) !== false) {
fwrite($csv,"$_idTag;;Blocked;;0\n");
fclose($csv);
}
} else {
log::add(__CLASS__, 'error', __("Badge inconnu : $_idTag", __FILE__), 'unableAuth');
}
}
return array('status' => 'Invalid');
Expand Down
7 changes: 7 additions & 0 deletions plugin_info/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@
<input class="configKey form-control" data-l1key="socketport" placeholder="9000" />
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label">{{Ajout automatique des utilisateurs}}
</label>
<div class="col-md-4">
<input type="checkbox" class="configKey form-control" data-l1key="autoadduser"/>
</div>
</div>
</fieldset>
</form>