Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-03-09 07:08:32

mrking
Member
Registered: 2015-03-09
Posts: 9

How can i create a user by code from other system?

I want to intergrate lhc with my existing system. Each my member has a user in LHC. so what should i do? Which API should i need?
Thanks anyway
P/S: Newbie big_smile

Offline

#2 2015-03-09 07:10:55

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How can i create a user by code from other system?

Take a loot at this extension, it's third party login to LHC which automatically creates user
https://github.com/LiveHelperChat/liveh … singon.php

Also it's file used to create new user in lhc from admin panel
https://github.com/LiveHelperChat/liveh … er/new.php

Offline

#3 2015-03-09 07:15:11

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

Ok thanks Ad. I'll try.

Offline

#4 2015-03-09 07:18:25

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

Another question big_smile:
i want display user status like this
http://vatgia.com/1087/do-dien-gia-dung.html
(each product has a chat operator, visitors can click to icon to chat)
Could you show me the way?

Offline

#5 2015-03-09 07:19:15

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How can i create a user by code from other system?

Offline

#6 2015-03-09 07:22:07

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

ok. Thanks. awesome!

Offline

#7 2015-03-09 09:52:15

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

hi Remdex, I'm trying display user status , so is there a js function to open Chat window from the status lable (ex: chat now) and  what embed code can i use?

Offline

#8 2015-03-09 14:09:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How can i create a user by code from other system?

Use chrome debug etc to see the calls. But like you are making unique widget you will have to figure-out yourself how everything works there.

Offline

#9 2015-03-10 06:47:58

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

[Automated hosting]
when i ran cron.php by SSH: php cron.php -s site_admin -e instance -c cron/maintain
it thrown an exception :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'ttkhcn_chat'***'%' to database 'lhc_manage_client_1'' in /home/ttkhcn/manager/extension/instance/classes/dbhandlers/mysql.php:10

Could you show me the solution?

Offline

#10 2015-03-10 06:49:55

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How can i create a user by code from other system?

Do you read errors? it's pretty obvious that user does not have permission to access client instance.

Access denied for user 'ttkhcn_chat'***'%' to database 'lhc_manage_client_1''

Offline

#11 2015-03-10 06:57:26

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

im using kloxo. "ttkhcn_chat" is database owner user. So which user i should use?

Offline

#12 2015-03-10 06:59:01

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How can i create a user by code from other system?

Sorry, but you will have to hire admin or so, because your knowledge is really lacking basic understanding how automating hosting/database users and so on works smile

Offline

#13 2015-03-10 07:04:01

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

ok. I c. I need an Root DB

Offline

#14 2015-03-10 07:57:44

mrking
Member
Registered: 2015-03-09
Posts: 9

Re: How can i create a user by code from other system?

I followed step by step the guide in doc.txt: step #17
- Cron successful
- Database created
...
I created two instance in Manager:quyking and test2 (all r active) with two db: lhc_manage_client_1,lhc_manage_client_2
but i checked by the url http://manager.mydomain.com/instance/isfree/test2
it returns FALSE
and when i access http://test2.mydomain.com/index.php/site_admin
it returns "....that web has not been configured for this domain on this server."
so could u tell me what to do next?
PS: all subdomain point to same folder as mydomain.com
Thanks anyway!

Last edited by mrking (2015-03-10 08:11:33)

Offline

Board footer