userMetaModel() 공개 정적인 메소드

Get a reference to the user meta model.
public static userMetaModel ( ) : UserMetaModel
리턴 UserMetaModel
예제 #1
0
 public function profileController_usernameMeta_handler($sender, $args)
 {
     // get all fields since that is better for caching!
     $profileFields = Gdn::userMetaModel()->getUserMeta($sender->User->UserID, 'Profile.%', 'Profile.');
     $nickname = $profileFields['Profile.' . c('Nickname.Fieldname')];
     if ($nickname) {
         echo '<span class="Nickname">(a.k.a. ' . $nickname . ')</span>';
     }
 }
예제 #2
0
파일: class.gdn.php 프로젝트: R-J/vanilla
 public static function get($Key, $Default = null)
 {
     $Response = Gdn::userMetaModel()->getUserMeta(0, $Key, $Default);
     if (sizeof($Response) == 1) {
         return val($Key, $Response, $Default);
     }
     return $Default;
 }
예제 #3
0
 /**
  * Instance of UserMetaModel.
  *
  * @return UserMetaModel
  */
 public function userMetaModel()
 {
     return Gdn::userMetaModel();
 }