/** * @test * @group userrepo */ public function should_return_null_when_org_with_acl_not_found() { $username = new Username('*****@*****.**'); $n_foo = new Name('foo'); $dn_foo = new DomainName('bar.be'); $foo = Organization::register($n_foo, $dn_foo); $user = $this->userRepo->userWithACL($username, $foo); $this->assertNull($user); }
/** * @param $userId * @param $orgId * @return User */ public function getProfile($userId, $orgId) { $organization = $this->organizationOfId($orgId); $user = $this->userOfId($userId); //fill user with ALL ACL info $user = $this->userRepo->userWithACL($user->username(), $organization); //add rest of available organizations $this->organizationsOfUser($user); //the given domainname is the realm $user->setRealm($organization); return $user; }