gexxxter / coinHiveMiner

Small UI for the https://coin-hive.com/ mining API
MIT License
22 stars 9 forks source link

When people have "loggedin" #4

Closed steffanjensen closed 7 years ago

steffanjensen commented 7 years ago

When people have "loggedin" how do i output the id from the database into a text. Lets say "Welcome back id "x"" ?

thanks awesome script

gexxxter commented 7 years ago

Do you want to output the numeric id from the database i.e. 1337 or the username like "Hi SlaxXx" ?

steffanjensen commented 7 years ago

Like hi 1337

gexxxter commented 7 years ago

With commit https://github.com/gexxxter/coinHiveMiner/commit/c84bb696238c6cadcb163a07808b5bb9e63328b1 I changed the loginUser.php to now return the user id as json.

To access and use the id in miner.js change the call to api/loginUser.php and interpret the response instead of ignoring it like I did.

To do so do the same changes to your local files like I did in this commit. https://github.com/gexxxter/coinHiveMiner/commit/eb97287845a738644eca7fe5c85e80d9af8c25aa

Hope this helps.

gexxxter commented 7 years ago

@reliefs can we close this or do you need any more help on this topic?