FreiChat related discussions
user integration problem

i'm already following the video tutorial.
and change hardcode.php :

/* Custom driver */
$usertable='frei_users'; //specifies the name of the table in which your user information is stored.
$row_username='username'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='id'; //specifies the name of the field in which the user's id is stored (usually id or userid)

https://dl.dropboxusercontent.com/u/82486071/1.jpg
https://dl.dropboxusercontent.com/u/82486071/2.jpg
https://dl.dropboxusercontent.com/u/82486071/3.jpg
https://dl.dropboxusercontent.com/u/82486071/4.jpg

login work successfuly, but it still displayed guest in chat list.
why? [custom integration]

i'm already following the video tutorial. and change hardcode.php : /* Custom driver */ $usertable='frei_users'; //specifies the name of the table in which your user information is stored. $row_username='username'; //specifies the name of the field in which the user's name/display name is stored. $row_userid='id'; //specifies the name of the field in which the user's id is stored (usually id or userid) https://dl.dropboxusercontent.com/u/82486071/1.jpg https://dl.dropboxusercontent.com/u/82486071/2.jpg https://dl.dropboxusercontent.com/u/82486071/3.jpg https://dl.dropboxusercontent.com/u/82486071/4.jpg login work successfuly, but it still displayed guest in chat list. why? [custom integration]

Is your frei_users table in the same or different database ?

https://dl.dropboxusercontent.com/u/82486071/1.jpg

The above should had worked.

Is your frei_users table in the same or different database ? https://dl.dropboxusercontent.com/u/82486071/1.jpg The above should had worked.
Necessity is the mother of all inventions!

Hello,

The issue is related to the sql query which uses the DBprefix for an already existing user table which was installed before the freichat, so when you place in the hardcode.php a table name like for example users, the sql query prepend the DBprefix you chose when installing your freichat. This is the problem i had so i removed the prefix from the query which is located in freichat/server/drivers/Custom.php

if (($_SESSION[$this->uid . 'time'] online_time || isset($_SESSION[$this->uid . 'usr_name']) == false || $first == 'false') && $_SESSION[$this->uid . 'is_guest'] == 0) { //To consume less resources , now the query is made only once in 15 seconds
if ($this->pdo_driver == "sqlsrv") {
$query = "SELECT DISTINCT TOP 1 " . $this->row_username . "," . $this->row_userid . "
FROM " . $this->usertable . "
WHERE " . $this->row_userid . "=?";
} else {
$query = "SELECT DISTINCT " . $this->row_username . "," . $this->row_userid . "
FROM " . $this->usertable . "
WHERE " . $this->row_userid . "=?
LIMIT 1";
}

Hello, The issue is related to the sql query which uses the DBprefix for an already existing user table which was installed before the freichat, so when you place in the hardcode.php a table name like for example users, the sql query prepend the DBprefix you chose when installing your freichat. This is the problem i had so i removed the prefix from the query which is located in freichat/server/drivers/Custom.php if (($_SESSION[$this->uid . 'time'] < $this->online_time || isset($_SESSION[$this->uid . 'usr_name']) == false || $first == 'false') && $_SESSION[$this->uid . 'is_guest'] == 0) { //To consume less resources , now the query is made only once in 15 seconds if ($this->pdo_driver == "sqlsrv") { $query = "SELECT DISTINCT TOP 1 " . $this->row_username . "," . $this->row_userid . " FROM " . $this->usertable . " WHERE " . $this->row_userid . "=?"; } else { $query = "SELECT DISTINCT " . $this->row_username . "," . $this->row_userid . " FROM " . $this->usertable . " WHERE " . $this->row_userid . "=? LIMIT 1"; }

Did you try the suggestion given by @djokage ?

Did you try the suggestion given by @djokage ?
Necessity is the mother of all inventions!

Tried this, still not working while logging in - still shows people as guest

Tried this, still not working while logging in - still shows people as guest

Do the users appear in freichat backend -> user moderation ?

Do the users appear in freichat backend -> user moderation ?
Necessity is the mother of all inventions!
164
5
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft