Skip to content

Commit

Permalink
Update user_shortcodes.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rica-carv authored Feb 11, 2025
1 parent 60ab558 commit 8fe0039
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions e107_core/shortcodes/batch/user_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,27 @@ function sc_user_forum_link($parm=null)

function sc_user_sendpm($parm=null)
{
$pref = e107::getPref();
// $pref = e107::getPref();
// why is this orphan $pref here?
$tp = e107::getParser();
if(e107::isInstalled("pm") && ($this->var['user_id'] > 0))
{
return $tp->parseTemplate("{SENDPM={$this->var['user_id']}}");
$parms_str = 'user='.$this->var['user_id'];

if ($parm) {
$parms_str .='&'.implode('&', array_map(
function($k, $v) {
return $k . '=' . $v;
},
array_keys($parm),
array_values($parm)
)
);
}

return $tp->parseTemplate("{SENDPM:".$parms_str.'}');

// return $tp->parseTemplate("{SENDPM={$this->var['user_id']}}");
}
}

Expand Down

0 comments on commit 8fe0039

Please sign in to comment.