Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^7: global var

by Anonymous Monk
on Apr 06, 2017 at 23:48 UTC ( [id://1187362]=note: print w/replies, xml ) Need Help??


in reply to Re^6: global var
in thread global var

Why does your code ask "managerusers" module to exports a "LoggedOn_user_id" function?

Replies are listed 'Best First'.
Re^8: global var
by tultalk (Monk) on Apr 07, 2017 at 22:24 UTC

    Answer his and one above.

    Manageusers is the "main" unit in the sense that everything get funneled back to that unit for accessing database tables and all the login /logout functions. I consider it the "main" unit to which manage_users.cgi interfaces between thr web pages and the guts of the program.

    The loggedonuser the ID of the user far accessing various other pieces of data such a database records "owned" by the user.

    The change from LoggedOn_user_id to GetLoggedOn... and back again was a result of trying an exported function result to pass the id vs a scalar variable. Neither worked.

    Other functions/.scalars are exported just fine. Not this one!!!

      ...Other functions/.scalars are exported just fine. Not this one!!!

      Then it shouldn't be too hard to duplicate that error in 20 lines, and post it here, right?

        A previous comment posted code as you suggest. It worked fine when I tested it. I have something screwed up somehow and I can't see it.

        Posting question here was hoping for some insight as to why something like this may be occurring.

        These are two declarations (same location in manageusers just before first function definition.

        our $adminaccess = 0; our $LoggedOn_user_id = 0;

        As I said in an earlier response, I can grab $adminaccess in javascript in html page.

        <script type="text/javascript"> var adminflag = $manageusers::adminaccess; </script>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1187362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found