echo not working in JomSocial plugin -


i making jomsocial plugin name of user when echo name not displaying name. here code

<?php defined('_jexec') or die('restricted access'); require_once jpath_root .'/components/com_community/libraries/core.php';  class plgcommunityname extends jplugin{      function getuserdetails(){         $cuser = cfactory::getuser();         $name = $cuser->username;         echo $name;     } }  ?> 

how can ?

try return $name; instead of echo $name;


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -