Change is_admin from constant to function