Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Encryption / decryption

Go to End

5 Posts   1811 Views


Community Member, 267 Posts

23 February 2012 at 12:12am

Edited: 24/04/2012 11:16pm


I'm using a modelAdmin to manage a tabel.

This tabel contains ames/addresses.. these are not encrypted yet.

How do i encrypt them? and how do i decrypt them in a way no one can view them if he/she just visits the database?

I want the user and the admins to be able to view them in their profile and modelAdmin, so they must be decrypted as well.

any idea?

Thanks in advance!


Community Member, 267 Posts

28 February 2012 at 4:13am



Community Member, 267 Posts

17 April 2012 at 7:09am



Community Member, 267 Posts

24 April 2012 at 6:44am

Edited: 24/04/2012 6:45am

i have no template to run functions through, because it's an automatically generated page with the User's profile.

i need a function like


class MemberExtraStatics extends DataObjectDecorator {

function onLoad() {
/* Run decrypt function */

How do i run a certain function on page load?


Plato Creative

Community Member, 26 Posts

24 April 2012 at 8:55am

The entire controller gets instantiated on page load. By default, the 'action' run is index(), so you could use this.
Or you could use init() if you want it to run on every load, not just the default (no) action.

Otherwise you can run renderWith to explicitly run a template.