Browse Source

Bugfix AcceptInvite

Roman Hergenreder 3 years ago
parent
commit
9730c97683
2 changed files with 4 additions and 3 deletions
  1. 3 2
      core/Api/UserAPI.class.php
  2. 1 1
      core/core.php

+ 3 - 2
core/Api/UserAPI.class.php

@@ -787,7 +787,7 @@ namespace Api\User {
 
     private function checkToken($token) {
       $sql = $this->user->getSQL();
-      $res = $sql->select("UserToken.token_type", "User.uid", "User.name", "User.email")
+      $res = $sql->select("UserToken.token_type", "User.uid", "User.name", "User.email", "User.confirmed")
         ->from("UserToken")
         ->innerJoin("User", "UserToken.user_id", "User.uid")
         ->where(new Compare("UserToken.token", $token))
@@ -821,7 +821,8 @@ namespace Api\User {
           $this->result["user"] = array(
             "name" => $tokenEntry["name"],
             "email" => $tokenEntry["email"],
-            "uid" => $tokenEntry["uid"]
+            "uid" => $tokenEntry["uid"],
+            "confirmed" => $tokenEntry["confirmed"]
           );
         } else {
           return $this->createError("This token does not exist or is no longer valid");

+ 1 - 1
core/core.php

@@ -1,6 +1,6 @@
 <?php
 
-define("WEBBASE_VERSION", "1.0.3");
+define("WEBBASE_VERSION", "1.0.4");
 
 function getProtocol() {
   return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";