diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 11:45:38 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 11:45:38 +0000 |
commit | d85570c9946aef61d8d935d9f50169215338d665 (patch) | |
tree | 80ff5e94178d9aa09bebfc6b897251078836cdd5 /h-source/Application/Models/UsersModel.php | |
parent | 8c287999487883a54271ae5e91bbb79b4fd15826 (diff) |
improved wiki
Diffstat (limited to 'h-source/Application/Models/UsersModel.php')
-rwxr-xr-x | h-source/Application/Models/UsersModel.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/h-source/Application/Models/UsersModel.php b/h-source/Application/Models/UsersModel.php index a7c3845..fe72ce7 100755 --- a/h-source/Application/Models/UsersModel.php +++ b/h-source/Application/Models/UsersModel.php @@ -88,6 +88,24 @@ class UsersModel extends Model_Map } } + public function getLinkToUser($user) + { + if (strstr($user,'__')) + { + return str_replace('__',null,$user); + } + else + { + return "<a href='http://".DOMAIN_NAME."/meet/user/".Lang::$current."/$user'>$user</a>"; + } + } + + public function getLinkToUserFromId($id_user = 0) + { + $clean['id_user'] = (int)$id_user; + return $this->getLinkToUser($this->getUser($clean['id_user'])); + } + //get the user id from the username public function getUserId($username = '') { |