1
0
mirror of https://github.com/flarum/core.git synced 2025-07-28 04:00:40 +02:00

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 bd584802e5
commit ee3640e160
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');
}