+ function log($code, $info) {
+ $result = $this->db->prepare('INSERT INTO `auth_log` (`code`, `info`, `ip_addr`) VALUES (:code, :info, :ipaddr);');
+ if (!$result->execute(array(':code' => $code, ':info' => $info, ':ipaddr' => $_SERVER['REMOTE_ADDR']))) {
+ // print($result->errorInfo()[2]);
+ }
+ }
+
+ function checkForSecureConnection() {
+ $errors = array();
+ if (($_SERVER['SERVER_PORT'] != 443) && !$this->running_on_localhost) {
+ $errors[] = _('You are not accessing this site on a secure connection, so authentication doesn\'t work.');
+ }
+ return $errors;
+ }
+