access() or get_user_flags()?
Hello. What is faster access(index, FLAG) or get_user_flags(index) & FLAG? Is there any difference?
|
Re: access() or get_user_flags()?
where are you using it that you need speed? maybe it would be better to cache the value to a boolean
|
Re: access() or get_user_flags()?
Use cmd_accessOr tell us in which context you want to use it.
In normal contexts, you shouldn't care about performances. |
Re: access() or get_user_flags()?
Yes, but i interested for what access(...) need? Isn't this the same with (get_user_flags(index) & FLAG)?
|
Re: access() or get_user_flags()?
context plz
|
Re: access() or get_user_flags()?
Code:
if(access(id, ADMIN_ADMIN));Code:
if(get_user_flags(id) & ADMIN_ADMIN); |
Re: access() or get_user_flags()?
PHP Code:
So : If you check admin access in a command, use cmd_access Else use access. You may also need has_flag or has_all_flags in some situations. |
Re: access() or get_user_flags()?
Thanks a lot :)
|
| All times are GMT -4. The time now is 08:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.