管理用户的框架
我正在寻找一个可以在我的新网络项目中使用的框架。
我主要关心的是处理我的用户,因此我正在寻找一个可以为我处理他们的框架。 我使用 PHP 进行开发,所以最好是它应该使用的语言。
我希望该框架能够处理新用户的注册,并且我还希望它能够处理会话和身份验证过程。
我有哪些选择,人们有什么建议?
I'm looking for a framework I can use in my new webproject.
The main concern for me is handling my users, therefore I'm on the lookout for a framwork that can handle them for me. I develop in PHP, so preferably that's the language it should use.
I would like the framework to take care of new users signing up and I would also like it to handle the sessions and authentication process.
What kind of options do I have, and what do people recommend?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您唯一想做的就是用户管理,那么您可以使用一些库(类)而不是完整的框架,因为(据我所知)没有任何东西称为仅用于用户管理的框架。
我现在正在制作一个名为 aiki 的框架,它是 gpl,所以这是我为用户管理编写的类,它可能会对您有所帮助
,这里是一个简单的 sql 转储,
现在您需要的只是添加数据库并创建里面的用户
请记住,您必须对密码进行 md5 两次,例如:
并使用此类:
构建一个表单,然后
$membership = newmembership();
登录:
$membership->login($_POST['用户名'], $_POST['密码']);
您可以在组表中构建组,然后
$membership->getUserPermissions($username);
然后您可以根据返回的 $membership->permissions 值执行操作
就像:
switch ($membership->permissions){
}
if the only thing you want to do is user management then you may use some libraries ( classes ) instead of full framework, because there is nothing ( as far as I know ) called framework for user management only..
I'm working now to make a framework called aiki, and it's gpl, so here is the class I wrote for user management it may help you
and here is a simple sql dump for that
now all you need is to add the db and create users inside it
remember that you will have to md5 the password twice, like:
and to use this class:
build a form then
$membership = new membership();
Login:
$membership->login($_POST['username'], $_POST['password']);
and you can build groups inside the groups table then
$membership->getUserPermissions($username);
then you can do thing based on the returned $membership->permissions value
like :
switch ($membership->permissions){
}
如果您不需要完整的 CMS,Zend Framework 非常适合直接使用成分。
您可能对 Zend_Acl、Zend_Auth 和 Zend_Session 组件最感兴趣。
我希望这就是您正在寻找的。
If you don't want a full CMS, the Zend Framework is excellent for drop-in components.
You would be most interested in the Zend_Acl, Zend_Auth, and Zend_Session components.
I hope this is what you're looking for.
这是一个您可以使用 Drupal 的项目吗? Drupal 框架处理用户管理/权限等的方式一直给我留下了深刻的印象...当然,它是基于 php 的,所以你应该感到宾至如归;)
我不知道你是否需要一个完整的-成熟的 CMS,但它可能会起作用。
Is this a project that you could use Drupal for? I've always been impressed with the way that the Drupal framework handles user management/privileges, etc... Of course, it's php based, so you should feel right at home ;)
I don't know if you need a full-fledged CMS, but it may do the trick.