static function deleteLoan($_loanId) { $loan = self::getLoan($_loanId); $objectId = $loan["LoanObject"]; if (Db::execute("DELETE FROM Loans\n WHERE LoanId = ?", $_loanId)) { return Db::execute("UPDATE Objects\n SET ObjectIsLent = 0\n WHERE ObjectID = ?", $objectId); } else { return false; } }
static function deleteRight($_objectId, $_userId) { return Db::execute("DELETE FROM RightExceptions\n WHERE RightExceptionObject = ? AND RightExceptionUser = ?", array($_objectId, $_userId)); }
static function setUserMobileToken($_userId, $_value) { return Db::execute("UPDATE Users\n SET UserMobileToken = ?\n WHERE UserId = ?", array($_value, $_userId)); }