Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
I'm creating an event website for high level participants, including some basic networking features. I LOVE the idea of participants sending private messages to each other via the website.
In an effort to protect communications as much as I can, what hooks can I look into to encrypt/decrypt private messages stored in the database? I don't mind attempting to build a module for this, and may use the Encrypt module to help.
Thanks for the tips in advance. :D
Chris
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2018-02-06 at 11.54.28.png | 374.22 KB | Elvin - Albania Drupal Developer |
Comments
Comment #1
ptmkenny CreditAttribution: ptmkenny commentedComment #2
semei CreditAttribution: semei commentedI am also very interested in this.
Comment #3
Rabuntu CreditAttribution: Rabuntu commentedYes i am very interested too.
Comment #4
alex.skrypnykeasy
Using
strpos($vars['message_body'], 'a:') === 0
to quickly assess if current field was encrypted.Comment #5
Elvin - Albania Drupal Developer CreditAttribution: Elvin - Albania Drupal Developer commented@Alex #4
when i implemented your code, the messages i sent would only appear encrypted to both me and the recipient. am i dont something wrong?
Comment #6
alex.skrypnyk@elvinI'm not sure what you mean by saying `only appear encrypted to both me and the recipient`. Anywhere you want to show the message, you need to call a
decrypt()
function explicitly, like in #4. This means that if you have a view with the message as a field - you need to alter a view result to decrypt it.Comment #7
simpleryan26.velacruz CreditAttribution: simpleryan26.velacruz commented@alex.designworks
i'm newbie on creating hooks for private message, please can i get a complete procedure to do #4... Thanks in advance...
Comment #8
Elvin - Albania Drupal Developer CreditAttribution: Elvin - Albania Drupal Developer commentedfor the moment i am not that proficient writing modules for drupal. if you could help with an addon module that takes care of the encrypt/decrypt function, i would really appriciate it and that would also help me learn the proper way of doing things! thank you for your time
Comment #9
oadaeh CreditAttribution: oadaeh at Hook 42 commented@alex.designworks thank you for your contribution.
@elvin you can start here: https://www.drupal.org/docs/7/creating-custom-modules
Comment #10
ivnish CreditAttribution: ivnish commented