Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mafen committed Mar 16, 2019
2 parents 485d227 + 6787086 commit 57038c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions activate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php include("includes/header.php"); ?>
<?php require_once("includes/init.php") ?>
<?php include("includes/views/header.php"); ?>

<!-- <?php if ($session->is_signed_in()) {redirect("profile.php");} ?> -->

Expand Down Expand Up @@ -28,4 +29,4 @@

<script src="js/functions.js"></script>

<?php include("includes/footer.php"); ?>
<?php include("includes/views/footer.php"); ?>
File renamed without changes.
5 changes: 4 additions & 1 deletion includes/classes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static function verify_user($email, $password) {

$sql = "SELECT * FROM " . self::$db_table . " WHERE ";
$sql .= "email = '{$email}' ";
$sql .= "AND status = 1 ";
$sql .= "LIMIT 1";

// Sends the sql into the database, gets a array with the users back, only one because limit 1.
Expand Down Expand Up @@ -277,7 +278,6 @@ public static function verify_new_user($username, $email, $password, $password_c
$sql = "SELECT * FROM " . self::$db_table . " WHERE ";
$sql .= "email = '{$email}' ";
$sql .= "AND password = '{$password}' ";
$sql .= "AND status = 1 ";
$sql .= "LIMIT 1";
$the_result_array = self::find_by_query($sql);

Expand Down Expand Up @@ -334,6 +334,9 @@ public static function verify_new_user($username, $email, $password, $password_c
$user->last_name = $last_name;
$user->user_image = "1.png";
$user->joined = date("Y-m-d");
$user->verify_code = md5($username . microtime());

Email::send_ActivationMail($email, $firstname, $user->verify_code);

$user->create();

Expand Down

0 comments on commit 57038c3

Please sign in to comment.