Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
682 views
in Plugins by
recategorized by

If i login throwout my plugin, loginip filed in DB table qa_user not change (i login with different ip). Should I do this? Or it's bug? And how I do this correctly

by
apologize for my English

1 Answer

+1 vote
by
 
Best answer

You're right - this is a bug/oversight that will be fixed in the next maintenance version.

In the meantime you can fix it by adding the following code in qa-app-users.php:

qa_db_user_logged_in($users[0]['userid'], @$_SERVER['REMOTE_ADDR']);

... after ...

qa_set_logged_in_user($users[0]['userid'], $users[0]['handle'], false, $source);

You'll also need to add { ... } brackets so that the if ($countusers) conditional covers both statements.

by
thx for answer
I will wait for the next release
Think not good idea force users make this change in Q2A sources
...