where to find $CURUSER where it being created?...
ok
im using latest (TBdev 09 source). and im aware ''as far as i have seemed'' that when i login, there should be created a variable... i think but my questions is, where to change ect?... im trying to convert some of it into my own web-tracker project, and would like to know where to look for it, and a explain on where its going to be created thanks that, orr could it be a function inside user-functions? thanks in advance dudes... :). |
user_login function on bittorrent.php creates the $CURUSER array, your select query selects all fields from users table so at any point over the source code you can use $CURUSER[' whatever variable name from users here '] anywhere over your source code and pull your values. If they are not in the select query you cant use it in $CURUSER as it wont exist, if your selecting all then that explains itself.
|
okay, thanks... i got it now i think :)
just that im trying to build up the same way as TBdev was builded... a global design from the file bittorrent.php inside the include folder... but each time im trying to login, then i just can't login... and i know this because of that when im logging in, then its supposed to send me to the index.php part... and it does not do that and i also on index.php have a loggedinorreturn function, same as tbdev 09 had ideas? tell me if you need the files to look into it if you wish elseway shoot away on what part i should be looking at thanks :) |
If you use it like this if ($CURUSER ) {
test here } It will hide everything or if ($CURUSER['class'] >= UC_POWER_USER) { $htmlout .=" shit here "; } This will make so you need to be a power user or above to see anything.. I hope it helps yeah But maybe Bigjoos can tell it better |
okay, thanks... just one question,
what do i need to edit if i wish to put more users into the tracker?... i mean, i know i have to define them inside config, but i also know that i need to define them other places... where would that be to be exact?... thanks :)... EDIT: this is the login.php page: PHP Code:
and this is the takelogin.php page: PHP Code:
PHP Code:
PS: is userlogin the only thing i need to get the login page to work? 'O_o... |
Quote:
PHP Code:
|
i know that part... just that i really need the login to work...
ideas?... |
You said your working on a new sourcecode... if you don't understand the principles of TBDev then your going to have your work cut out.
I strongly advise not to copy TBDev if your going to be using CakePHP, well i strongly advise not to use CakePHP either. Why? TBDev is light compared to CakePHP so you should follow the same approach, how it works in most tracker software is a user logins in via the login page a cookie is set with something that can identify a sole user then a redirection... The redirection forces the userlogin to be called again but this time you have a cookie so it will attempt to get the data associated with what was set. |
EDIT:
here is my bittorrent.php login functions: PHP Code:
and here is my login.php file: PHP Code:
and this is my takelogin.php file: PHP Code:
PHP Code:
thanks in advance... Bump: seriously... no one?... i have can you at least tell me if i need somfthing... just that i think i have it all, and still wont work -.-'... Bump: hello again, a test can be viewed here: http://www.speed-scene.com/personal_sites/ssv1/speedscene/login.php :)... |
All times are GMT +2. The time now is 07:38. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.