问题创建用户对象 [英] Problem Creating a User Object

查看:63
本文介绍了问题创建用户对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我一直在尝试实施更加面向OOP的方法来处理我的某个网站上的用户安全性,我正在尝试验证用户一系列角色,但我正在努力解决类型错误:

Hi,

I''ve been trying to implement a more OOP oriented approach to dealing with user security on one of my websites, and I am trying to validate the user against an array of roles, however I am struggling with a type error:

展开 | 选择 | Wrap | 行号

推荐答案

你传递的是列表而不是数组。您可以做的是接受一个字符串作为输入并转换为函数中的数组,或者使用cfset创建数组并将其传递给setRoles。
You''re passing a list rather than an array. What you could do is accept a string as the input and convert to an array in the function, or create the array with cfset and pass that to setRoles.



你传递的是列表而不是数组。你可以做的是接受一个字符串作为输入并转换为函数中的数组,或者使用cfset创建数组并将其传递给setRoles。
You''re passing a list rather than an array. What you could do is accept a string as the input and convert to an array in the function, or create the array with cfset and pass that to setRoles.



啊,好吧我会的。非常感谢您的帮助,我很快就会有一些问题!

Ah right ok I''ll do that. Thanks alot for your help, I''ll no doubt have some questions shortly!


没问题,如果您这样做,您知道将来的地方:)
No problem, if you do, you know where to come :)


这篇关于问题创建用户对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆