Jump to content

user class for a social network


smartin1017

Recommended Posts

Hi guys. Recently I stopped working for a company that I helped build a social network for. I had created classes and used those throughout the site. I now want to work on my own project but i cannot use what I created there. Now, I created a simple user class that allowed me to easily use the members info throughout the site. The only way I could think to do this was to name all the public variables within the class then pull the information from the DB for that user using their id and naming it to the public variables. End result, I would just have to do something like this to get the user info.

 

$mem = new User($id)

 

Then if i needed something, say their name I would use..

 

$mem->username

 

I am being broad because I cannot use or reprint the code. It now belongs to them. I want to create the same thing for my project but I dont want to use something that is proprietary to them.My questions..

 

Can something like that be copywritten where there really isnt any other way to do it and

 

If so what other way could I do it so I am not taking something I already wrote but doesnt belong to me.

 

Its pretty confusing, any help would be greatly appreciated.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.