當前位置: 首頁>>代碼示例>>PHP>>正文


PHP User_Model::get_id方法代碼示例

本文整理匯總了PHP中User_Model::get_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP User_Model::get_id方法的具體用法?PHP User_Model::get_id怎麽用?PHP User_Model::get_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在User_Model的用法示例。


在下文中一共展示了User_Model::get_id方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: register

 /**
  * Register new user
  * 
  * @access public
  * @return string Returns "OK" string upon succession and error message otherwise
  */
 public function register()
 {
     $xml = apiler::get_xml();
     try {
         $user = new User_Model($xml->login, $xml->password, $xml->email, $xml->description);
         $this->store_avatar($user->get_id($xml->login));
         echo "OK";
     } catch (Exception $e) {
         echo $e->getMessage() . "\n";
         die;
     }
 }
開發者ID:ArtemD,項目名稱:SpeedFreak,代碼行數:18,代碼來源:users.php

示例2: insert

 public function insert($category, $username, $value)
 {
     $cat = new Category_Model();
     $category = $cat->get_id($category);
     $user = new User_Model();
     $username = $user->get_id($username);
     $results = $this->db->query("INSERT INTO results SET cat_id = ?, user_id = ?, value = ?, result_date = NOW()", $category, $username, $value);
     if ($results) {
         return true;
     } else {
         return false;
     }
 }
開發者ID:ArtemD,項目名稱:SpeedFreak,代碼行數:13,代碼來源:result.php

示例3: change_data

 /**
  * Change user profile
  * @param array post data
  * @param string user id
  */
 public function change_data($post, $email)
 {
     $user = new User_Model();
     $id = $user->get_id($email);
     if (self::profile_exists($email)) {
         //update data
         $data = array('customer_street' => $post['customer_street'], 'customer_city' => $post['customer_city'], 'customer_postal_code' => $post['customer_postal_code'], 'customer_phone' => $post['customer_phone'], 'billing_name' => $post['billing_name'], 'billing_street' => $post['billing_street'], 'billing_city' => $post['billing_city'], 'billing_postal_code' => $post['billing_postal_code'], 'billing_identity_number' => $post['billing_identity_number'], 'billing_vat_number' => $post['billing_vat_number']);
         $this->db->update(self::TN_EXTEND, $data, array('user' => $id));
     } else {
         //create data
         $data['user'] = $id;
         $this->db->insert(self::TN_EXTEND, $data);
     }
 }
開發者ID:repli2dev,項目名稱:re-eshop,代碼行數:19,代碼來源:customer.php

示例4: user_id

 /**
  * Return ID of current user
  * @return integer ID of user
  */
 public function user_id()
 {
     $user = new User_Model();
     return $user->get_id(self::user_email());
 }
開發者ID:repli2dev,項目名稱:re-eshop,代碼行數:9,代碼來源:user.php


注:本文中的User_Model::get_id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。