Profile / Personalization module for Prado 3

I’ve made a profile module for Prado that lets you store user preferences etc in a database. I got the idea from the ASP.net Profile classes (visit) . At the moment the module uses SQL-Lite as storage engine, but I plan on adding support for XML and SQL databases. The module overrides PHP’s “magic methods” __get and __set, which makes access to the keys really easy. I’ve submitted this to the Prado TRAC asking them to add it to the framework. The code could use some cleaning.
Usage:


$this->Profile->SomeSetting = “some value”; // creates the key SomeSetting for the current user ID with the value “some value”
$foo = $this->Profile->SomeSetting; // retrieves the value of SomeSetting for the current user ID

The first version is available here. I plan on refactoring it a bit to make sure it can be used with different kinds of user setups.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: