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
https://forums.phpfreaks.com/topic/173707-user-class-for-a-social-network/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.