Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
417 views
in Q2A Core by

 

When I echo the user level that is established (using single-login mode) the level appears as super and admin (depending on what I was testing for) yet the page "index.php?qa=admin" tells me only administrators can access that page?

What am I missing??

1 Answer

+1 vote
by
 
Best answer

You shouldn't set the level to the string 'super' or 'admin'. Rather, you should use the numerical constants at the top of qa-app-users.php, e.g. 120 for the super administrator. Unless of course I am misunderstanding your question?

by
I am using this:

if($data['account']==1){
    if($data['user']==1){
        $user['level']='QA_USER_LEVEL_SUPER';
    }else{
        $user['level']='QA_USER_LEVEL_ADMIN';
    }
}else{
    $user['level']='QA_USER_LEVEL_BASIC';
}

And I should have super permissions (including admin) and I don't when I log in and navigate to that page?
by
QA_USER_LEVEL_SUPER and its like are numerical constants, not strings, so you need to take them out of the quote marks in your code.
by
Perfect. Thanks!
...