Jump to:

23364 Posts in 18125 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Encryption / decryption

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

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

Page: 1
Go to End
Author Topic: 768 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    Encryption / decryption Link to this post

    Hello,

    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!

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Encryption / decryption Link to this post

    up!

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Encryption / decryption Link to this post

    up!

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Encryption / decryption Link to this post

    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

    <?php

    class MemberExtraStatics extends DataObjectDecorator {

    function onLoad() {
    /* Run decrypt function */
    $this->getBankNumber();
    }
    }

    How do i run a certain function on page load?

    Ty!

  • Plato
    Avatar
    Community Member
    26 Posts

    Re: Encryption / decryption Link to this post

    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.

    768 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.