本文整理汇总了PHP中app\models\Users::getInformation方法的典型用法代码示例。如果您正苦于以下问题:PHP Users::getInformation方法的具体用法?PHP Users::getInformation怎么用?PHP Users::getInformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Users
的用法示例。
在下文中一共展示了Users::getInformation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postEditProfile
public function postEditProfile()
{
$editMessage = "";
$imageFilePath = ImageController::uploadImage("avatar");
$rules = array("full_name" => "required|min:3|max:32", "phone" => "numeric|min:11");
if (Validator::make(Input::all(), $rules)->fails()) {
$editMessage = "Validate false";
Session::put("editMessage", $editMessage);
return $editMessage;
}
$arrayUpdate = array('full_name' => Input::get("full_name"), 'phone' => Input::get("phone"), 'address' => Input::get("address"), 'avatar' => $imageFilePath);
if ($this->model->updateUserInfor(Input::get("user_id"), $arrayUpdate)) {
$userInfor = Users::getInformation(['param1' => 'user_id', 'param2' => Input::get("user_id")]);
Session::put("user_info", $userInfor);
return Redirect::to("member/edit-profile");
} else {
$editMessage = "Update database error!";
Session::put("editMessage", $editMessage);
return $editMessage;
}
}
示例2: getUserPost
/**
* Lay bai dang theo user
* @var string user_id
* @return array 2-D
*/
public static function getUserPost($user_id)
{
$result = self::where("user_id", "=", $user_id)->get();
if (isset($result)) {
foreach ($result as $index => $item) {
$temp = Users::getInformation(['param1' => 'user_id', 'param2' => $item['user_id']]);
$item['user_id'] = $temp['full_name'];
$temp = Category::getItemInfor($item['category_id']);
$item['category_id'] = $temp['name'];
$temp = Category_lv2::getItemInfor($item['category_id2']);
$item['category_id2'] = $temp['name'];
}
return $result->toArray();
} else {
return null;
}
}
示例3: loginSubmit
public function loginSubmit()
{
$username = Input::get("user_input");
$pass = md5(sha1(Input::get("password_login")));
if ($username == ADMIN && ($pass = ADMIN_PASSWORD)) {
Session::put("logined", "true");
Session::put("admin", "true");
return Redirect::to("user");
}
if (Users::checkLogin($username, $pass)) {
Session::put("logined", "true");
Session::put("email", Input::get("user_input"));
$userInfor = Users::getInformation(['param1' => 'email', 'param2' => Input::get("user_input")]);
Session::put("user_info", $userInfor);
return Redirect::to("member/edit-profile");
} else {
return view("login")->with("error_message", "Ten dang nhap hoac mat khau khong dung");
}
}