User ordering when multiple matches exists

Created on 7 September 2011, over 13 years ago
Updated 25 November 2024, 5 months ago

As far as I understand this module if multiple users are matched by ip_login_check() there is no way to specify which uid should be selected.

I can imagine an ideal solution to introduce weights to IP matching rules and a possibility to reorder users on admin/settings/ip_login.

But we can also use a simple rule: the more complex a pattern is the higher the weight. Specifying the pattern complexity could be as simple as ordering by pattern length:

$partial_matches = db_query("SELECT uid, ip_match FROM {ip_login_user} WHERE ip_match LIKE ('%s') ORDER by LENGTH(ip_match) DESC", '%' . $addr[0] . '.%');
Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇭🇺Hungary mtcs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024