diff options
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 = '') { |