mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 01:16:26 +02:00
User setting update now create setting if it doesn't exists yet instead of returning an error
This commit is contained in:
parent
9aa3eca812
commit
fb3f9425d1
3 changed files with 43 additions and 4 deletions
|
@ -35,6 +35,18 @@ namespace controllers\internals;
|
|||
return $settings_array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a user setting by his name for a user.
|
||||
*
|
||||
* @param int $id_user : user id
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_by_name_for_user(int $id_user, string $name)
|
||||
{
|
||||
return $this->get_model()->get_by_name_for_user($id_user, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a setting by his name and user id.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue