Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use my own user class and pass userid to it ? #105

Open
mhmd1983 opened this issue Sep 17, 2017 · 1 comment
Open

how to use my own user class and pass userid to it ? #105

mhmd1983 opened this issue Sep 17, 2017 · 1 comment

Comments

@mhmd1983
Copy link

I can't get it to use my own user class , i need to pass an id for the userclass to init the user info

@Xaraknid
Copy link
Collaborator

Xaraknid commented Sep 19, 2017

I think the easiest way.

Modify user.php adding all variables you need. Then let the connection do is magic inside "connected($user)" function.

$user->id = $myid;

Be sure to not have any collision when modifying the id. Any data transfer is tied to the socket you can safely modify the id as the connected function is called last in handshake process.

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

No branches or pull requests

2 participants