remove use of like which might cause unwanted side effects (#1787)

This commit is contained in:
Daniël Klabbers 2019-06-03 12:04:17 +02:00 committed by Franz Liedke
parent c740c7f593
commit 57463f4862
2 changed files with 3 additions and 3 deletions

View File

@ -45,8 +45,8 @@ class DatabaseSettingsRepository implements SettingsRepositoryInterface
$query->$method(compact('key', 'value'));
}
public function delete($keyLike)
public function delete($key)
{
$this->database->table('settings')->where('key', 'like', $keyLike)->delete();
$this->database->table('settings')->where('key', $key)->delete();
}
}

View File

@ -75,7 +75,7 @@ class UserRepository
*/
public function getIdForUsername($username, User $actor = null)
{
$query = User::where('username', 'like', $username);
$query = User::where('username', $username);
return $this->scopeVisibleTo($query, $actor)->value('id');
}