dongwo1914 2014-02-21 20:24
浏览 20

CakePHP 1.3如何拥有2个不同的登录页面和2个表

Let's say I have 2 tables : Users and Customers.

Users table contained the admin and manager of the site.

Customers table contained the customer who want to buy something from the site.

Usually Cake Standard is to put everything under one table. But, Is there anyway in CakePHP 1.3 to have 2 different login with 2 different table?

I know specifically which table has to be used on different page. e.g:

If the site is :

www.domain.com/admin  --> This login page should use Users table (default has been implemented)

but now, I need to implement another login page for customer and I decide to separate the table to be cleaner on database part.

www.domain.com  --> This login page should use customers table.

So, how to achieve this? Is this a really bad practice?

  • 写回答

2条回答 默认 最新

  • dsfadsa08911 2014-02-21 20:26
    关注

    I honestly think this is indeed a bad practice. You should consider putting every kind of "loggable" user in the same table and having a column named role which defines privileges.

    评论

报告相同问题?

悬赏问题

  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动