English 中文(简体)
成功登记后,立即登录在磁场
原标题:Immediate login after successful registration on a plone site

我有习惯登记BrowserView,你必须提供一些用户数据(z3c.与包括密码在内的一些领域的情况)。 在成功保存这些数据之后,用户就希望自动登录,并转往网站的另一页。

事先感谢背心

最佳回答

因此,我的工作解决办法(指出朝正确方向努力的奇科):

  1. 1. 认证贵国在考绩制度中的注册资格

    member = portal.acl_users.authenticate(username, password, portal.REQUEST)
    
  2. 转而指示它为确定认证 co而 ne。 你可以通过“最新指数”来做到这一点(见pas/plugins/cookie_handler)。

    if member:
        portal.acl_users.updateCredentials(portal.REQUEST, portal.REQUEST.RESPONSE, username, password)
    
  3. 页: 1

    portal.REQUEST.RESPONSE.redirect(url)
    
问题回答

如果你想扩大新成员的用户数据,并在登记表中增加新的领域,则可能最好扩大提供缺省用户数据表的效用,并且这样做,使你能够顺利地掌握在现有登记机制中。

有一个例子: Collection.examples.userdata,你可以为此目的使用并推广。 它还有很好的文件,向你们解释了所有必要的步骤。

http://plone.org/products/view.examplesuser





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签