aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-18 22:51:52 -0700
committerzotlabs <mike@macgirvin.com>2017-06-18 22:51:52 -0700
commitb0a6a5a91e0180c0ed3de1af324e7b9567c5e108 (patch)
tree1e50ed9d1af345dd9d465d1f6d77d02d498f72bb /include
parentb917cf1eccc62f5f533c0a61ffd699764b39e404 (diff)
downloadvolse-hubzilla-b0a6a5a91e0180c0ed3de1af324e7b9567c5e108.tar.gz
volse-hubzilla-b0a6a5a91e0180c0ed3de1af324e7b9567c5e108.tar.bz2
volse-hubzilla-b0a6a5a91e0180c0ed3de1af324e7b9567c5e108.zip
minor cleanup of moderated comment feature
Diffstat (limited to 'include')
-rw-r--r--include/channel.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/channel.php b/include/channel.php
index 86fa2a63a..433c7c52c 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -2335,28 +2335,31 @@ function anon_identity_init($reqvars) {
if(! $anon_url)
$anon_url = z_root();
+ $hash = hash('md5',$anon_email);
+
$x = q("select * from xchan where xchan_guid = '%s' and xchan_hash = '%s' and xchan_network = 'unknown' limit 1",
dbesc($anon_email),
- dbesc($anon_email)
+ dbesc($hash)
);
if(! $x) {
xchan_store_lowlevel([
'xchan_guid' => $anon_email,
- 'xchan_hash' => $anon_email,
+ 'xchan_hash' => $hash,
'xchan_name' => $anon_name,
'xchan_url' => $anon_url,
'xchan_network' => 'unknown',
'xchan_name_date' => datetime_convert()
]);
+
$x = q("select * from xchan where xchan_guid = '%s' and xchan_hash = '%s' and xchan_network = 'unknown' limit 1",
dbesc($anon_email),
- dbesc($anon_email)
+ dbesc($hash)
);
$photo = z_root() . '/' . get_default_profile_photo(300);
- $photos = import_xchan_photo($photo,$anon_email);
+ $photos = import_xchan_photo($photo,$hash);
$r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_guid = '%s' and xchan_hash = '%s' and xchan_network = 'unknown' ",
dbesc(datetime_convert()),
dbesc($photos[0]),
@@ -2364,7 +2367,7 @@ function anon_identity_init($reqvars) {
dbesc($photos[2]),
dbesc($photos[3]),
dbesc($anon_email),
- dbesc($anon_email)
+ dbesc($hash)
);
}