summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
Diffstat (limited to 'application/models')
-rw-r--r--application/models/Mfile.php (renamed from application/models/mfile.php)0
-rw-r--r--application/models/Mmultipaste.php (renamed from application/models/mmultipaste.php)0
-rw-r--r--application/models/Muser.php (renamed from application/models/muser.php)9
-rw-r--r--application/models/index.html3
4 files changed, 8 insertions, 4 deletions
diff --git a/application/models/mfile.php b/application/models/Mfile.php
index 977240c89..977240c89 100644
--- a/application/models/mfile.php
+++ b/application/models/Mfile.php
diff --git a/application/models/mmultipaste.php b/application/models/Mmultipaste.php
index 52ea4dfb4..52ea4dfb4 100644
--- a/application/models/mmultipaste.php
+++ b/application/models/Mmultipaste.php
diff --git a/application/models/muser.php b/application/models/Muser.php
index 1ee6c259a..e59572f82 100644
--- a/application/models/muser.php
+++ b/application/models/Muser.php
@@ -156,8 +156,7 @@ class Muser extends CI_Model {
*/
public function valid_email($email)
{
- $this->load->helper("email");
- return valid_email($email);
+ return $email === filter_var($email, FILTER_VALIDATE_EMAIL);
}
public function add_user($username, $password, $email, $referrer)
@@ -276,7 +275,7 @@ class Muser extends CI_Model {
function require_access($wanted_level = "full")
{
- if ($this->input->post("apikey") !== false) {
+ if ($this->input->post("apikey") !== null) {
$this->apilogin($this->input->post("apikey"));
}
@@ -324,6 +323,10 @@ class Muser extends CI_Model {
->where('user', $userid)
->get()->row_array();
+ if ($query === null) {
+ $query = [];
+ }
+
$extra_fields = array(
"username" => $this->get_username(),
"email" => $this->get_email($userid),
diff --git a/application/models/index.html b/application/models/index.html
index c942a79ce..b702fbc39 100644
--- a/application/models/index.html
+++ b/application/models/index.html
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
@@ -7,4 +8,4 @@
<p>Directory access is forbidden.</p>
</body>
-</html> \ No newline at end of file
+</html>