Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Show content based on permission
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Zaka" data-source="post: 397628" data-attributes="member: 12728"><p>I would highly suggest you create a method for checking permissions instead which takes a parameter (the username) and returns a bool response or 0 and 1. Then you can easily just create a if statement with the conditions in a single phrase, and inside of that statement put all the data for that permission. </p><p></p><p>Think like this, every function you would need more than once, needs a own definition, it needs to be a method.</p></blockquote><p></p>
[QUOTE="Zaka, post: 397628, member: 12728"] I would highly suggest you create a method for checking permissions instead which takes a parameter (the username) and returns a bool response or 0 and 1. Then you can easily just create a if statement with the conditions in a single phrase, and inside of that statement put all the data for that permission. Think like this, every function you would need more than once, needs a own definition, it needs to be a method. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Show content based on permission
Top