本文整理匯總了PHP中User_Model::setPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP User_Model::setPassword方法的具體用法?PHP User_Model::setPassword怎麽用?PHP User_Model::setPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類User_Model
的用法示例。
在下文中一共展示了User_Model::setPassword方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createObjectFromData
public function createObjectFromData($row)
{
//Create a new user_model object
$user = new User_Model();
//Set the ID on the user model
$user->setId($row->id);
//Set the username on the user model
$user->setUsername($row->username);
//Set the password on the user model
$user->setPassword($row->password);
//Return the new user object
return $user;
}
示例2:
function get_user_info($user_id)
{
$userinfo = false;
if ($user_id && (int) $user_id > 0) {
$CI =& get_instance();
$query = $CI->db->select("*")->from("cs_users")->where(array("user_id" => $user_id))->get();
if ($query && $query->num_rows() == 1) {
$CI->load->model("user_model");
$userinfo = new User_Model();
$rw = $query->row();
$userinfo->setUsername($rw->username);
$userinfo->setUserid($rw->user_id);
$userinfo->setPassword($rw->password);
$userinfo->setStatus($rw->status);
$userinfo->setLevel($rw->level);
$userinfo->setType($rw->type);
$userinfo->setCreatedon($rw->created_on);
$userinfo->setLastupdate($rw->last_update);
}
}
return $userinfo;
}
示例3: createObjectFromData
public function createObjectFromData($row)
{
$user = new User_Model();
$user->setId($row->userID);
$user->setUsername($row->username);
$user->setPassword($row->password);
$user->setSalt($row->salt);
$user->setEmail($row->email);
$user->setFirstName($row->firstname);
$user->setLastName($row->lastname);
$user->setUserType($row->userType);
$user->setDivision($row->divisionID);
$user->setDivisionName($row->name);
$user->setDivisionDescription($row->description);
$user->setStatus($row->status);
return $user;
}