首页 > 其他 > 详细

FOSuserBundle(发送邀请码给用户)

时间:2016-06-06 11:49:52      阅读:128      评论:0      收藏:0      [点我收藏+]

http://symfony.com/doc/master/bundles/FOSUserBundle/adding_invitation_registration.html

上面的构建实体注册服务之类的按照文档去操作。对应自己的地方稍加修改即可。

运用方法

public function inviteAction() {
    $em = $this->getDoctrine()->getManager();
    $invitation = new Invitation();
    $em->persist($invitation);
    // and then just output your $invitation->getCode() to user
    // also don‘t forget to check invitation as sent: $invitation->send()
}

 

FOSuserBundle(发送邀请码给用户)

原文:http://www.cnblogs.com/g825482785/p/sendcode.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!