Skip to content

Fix issue with setting user last IP#3

Open
biplobice wants to merge 1 commit into
concretecms:masterfrom
biplobice:fix/user-cleaner-ip-issue
Open

Fix issue with setting user last IP#3
biplobice wants to merge 1 commit into
concretecms:masterfrom
biplobice:fix/user-cleaner-ip-issue

Conversation

@biplobice

Copy link
Copy Markdown

In Users table uLastIP is stored as hex value. But current cleaner sets the value as string which causes user inaccessible on the dashboard.

This PR fixes the issue.

@KorvinSzanto

Copy link
Copy Markdown
Member

I'm curious if this is concrete5 version specific, I haven't looked into it but I'd assume it is

@mlocati

mlocati commented Feb 21, 2022

Copy link
Copy Markdown

I'm curious if this is concrete5 version specific, I haven't looked into it but I'd assume it is

Yep, concrete uses a strange format for the Users.uLastIP format: storing 127.0.0.1 it it causes this warning when visiting the dashboard members pages:

hex2bin(): Hexadecimal input string must have an even length

Stacktrace:
- in .../concrete/src/Utility/IPAddress.php:92
- hex2bin in .../concrete/src/Utility/IPAddress.php:92
- Concrete\Core\Utility\IPAddress:hex2bin in .../concrete/src/Utility/IPAddress.php:66
- Concrete\Core\Utility\IPAddress:getIp in .../concrete/src/User/UserInfo.php:860
- Concrete\Core\User\UserInfo:getLastIPAddress in .../concrete/single_pages/dashboard/users/search/edit.php:79
[...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants