Bugfix AcceptInvite

This commit is contained in:
Roman Hergenreder 2020-08-09 14:23:36 +02:00
parent c2e9d6c149
commit 9730c97683
2 changed files with 4 additions and 3 deletions

@ -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,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";