Design question: User objects and a Role object



I have a user object that is set when a user logs in. There are also
permissions that I get about the user from a web service. Currently I
take the results from those web services and store them as XML in the
user object so I can parse it when I need to look at them. I wanted to
turn the xml permissions into ROle objects, but does that mean that my
User class needs to make reference to the Role class?

User class example

class User{

protected $firstName;
protected $lastName;
protected $employeeNumber;
protected $orgCode;
protected $roles; //Could this be an object of my class Role?
protected $scope;
protected $type;
protected $primaryAssignmentsXML = null;
protected $securityRolesXML = null;

.... getters ad setters



getRole(roleName){
//get the securityRolesXML and then parse it setting the Role
Object

$role = new Role();
$role->setName();
$role->setFunction();


return $role;
}


Is this how I should be going about this?
.



Relevant Pages

  • Re: Design question: User objects and a Role object
    ... permissions that I get about the user from a web service. ... //get the securityRolesXML and then parse it setting the Role ... Of course, if you have a straight hierarchy, then you could get by with only one role. ...
    (comp.lang.php)
  • Re: Design question: User objects and a Role object
    ... permissions that I get about the user from a web service. ... turn the xml permissions into ROle objects, but does that mean that my ... <?php echo 'Just another PHP saint'; ...
    (comp.lang.php)
  • Re: Access Denied
    ... Determine the account ... is running under and grant it modify permissions on the folder where you ... > local machine but when I use the Web Service to log the error, ... > How can I overcome this security issue on a Web Server so that I can write ...
    (microsoft.public.dotnet.languages.csharp)
  • Creating a booking engine with Web Services
    ... Then I get an xml base response from the web service. ... So XSLT will help me parse the data, I also want to use that data i parse ... They respond back with an XML document. ... Then the customer will pick a flight ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Calling web service from ASP
    ... >I've a requirement to call a web service from an ASP page. ... >service and I thought I can call that component very easily from ASP. ... >have the code to place these permissions dynamically at client place, ... >Some people are saying that using VB.NET as the language, ...
    (microsoft.public.dotnet.framework.webservices)