Browse Source

Add getUser contract function

develop
Apostolos Fanakis 4 years ago
parent
commit
fcab5ed3d6
  1. 5
      packages/concordia-contracts/contracts/Forum.sol

5
packages/concordia-contracts/contracts/Forum.sol

@ -1,5 +1,6 @@
//SPDX-License-Identifier: MIT
pragma solidity 0.7.1;
pragma experimental ABIEncoderV2;
contract Forum {
@ -73,6 +74,10 @@ contract Forum {
return users[userAddress].timestamp;
}
function getUser(address userAddress) public view returns (User memory) {
require(hasUserSignedUp(userAddress), "User hasn't signed up yet.");
return users[userAddress];
}
//----------------------------------------POSTING----------------------------------------
struct Topic {

Loading…
Cancel
Save