Ive looked docs, and the nearest is the mailto tag, thats for saving the mailto sintax around a mail address. Or sitename tag, which is the same but for the site name. But is there a tag that you could put into the template and will print the email address you have in my account site preferences.
Or maybe some php snippet you could put in a user defined tag to get the same output.
Ive even read through data base and cmsms files, and found where does this come and where is it stored. But not being a programmer myself i did not guess either how to do it, nor if it would be a good idea at all cause could make for a stupid way of increasing requests and resources on each page load or something.
[SOLVED]Is there a way to print email address in my account
[SOLVED]Is there a way to print email address in my account
Last edited by userwords on Tue Oct 29, 2013 6:15 am, edited 1 time in total.
Re: Is there a tag or a way to print email address in my acc
No there isn't.
The UDT (name it for example get_user_email):
Usage:
The UDT (name it for example get_user_email):
Code: Select all
$db = cmsms()->GetDb();
$user_name = isset($params['username']) ? $params['username'] : null;
$db_identifier = is_numeric($user_name) ? 'user_id' : 'username';
$query = "SELECT email FROM " . cms_db_prefix() . "users WHERE $db_identifier = ?";
$row = $db->GetRow($query, array($user_name));
if($row)
$result = $row['email'];
if(!isset($result))
$result = 'Username: ' . $user_name . ' doesn\'t exist';
if(isset($params['assign'])){
$smarty->assign(trim($params['assign']), $result);
} else {
return $result;
}
Code: Select all
{get_user_email username='username_or_id_of_backend_user_to_get_info_from' assign='is_user_email'}
{if !empty($is_user_email)}
Editor Email: {$is_user_email}
{/if}
Re: Is there a tag or a way to print email address in my acc
Another way to improve cmsms usage. Very detailed explanation.