Merge pull request #9 from ThomasRubini/recipe_view_username
This commit is contained in:
commit
d60d0891de
@ -25,7 +25,7 @@ final class RecipeModel
|
||||
$A_recipe["INGREDIENTS"] = $O_ingredientModel->searchByRecipe($A_recipe["ID"]);
|
||||
|
||||
$O_userModel = new UserModel();
|
||||
$A_recipe["AUTHOR_NAME"] = $O_userModel->getNameByID($A_recipe["AUTHOR_ID"]);
|
||||
$A_recipe["AUTHOR_USERNAME"] = $O_userModel->getUsernameByID($A_recipe["AUTHOR_ID"]);
|
||||
|
||||
$O_userModel = new DifficultyModel();
|
||||
$A_recipe["DIFFICULTY_NAME"] = $O_userModel->getByID($A_recipe["DIFFICULTY_ID"]);
|
||||
|
@ -46,10 +46,10 @@ final class UserModel
|
||||
return $row;
|
||||
}
|
||||
|
||||
public function getNameByID($I_id)
|
||||
public function getUsernameByID($I_id)
|
||||
{
|
||||
$O_model = Model::get();
|
||||
$stmt = $O_model->prepare("SELECT NAME FROM USER WHERE ID=:id");
|
||||
$stmt = $O_model->prepare("SELECT USERNAME FROM USER WHERE ID=:id");
|
||||
$stmt->bindParam("id", $I_id);
|
||||
$stmt->execute();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user