src/Biz/User/Register/Impl/BaseRegister.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\User\Register\Impl;
use Biz\User\UserException;
use Codeages\Biz\Framework\Context\Biz;
use AppBundle\Common\SimpleValidator;
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
abstract class BaseRegister
{
protected $biz;
public function __construct(Biz $biz)
{
$this->biz = $biz;
}
public function register($registration)
{
if (empty($registration['type'])) {
$registration['type'] = 'default';
}
$this->validate($registration);
list($user, $registration) = $this->createUser($registration);
$this->createUserProfile($registration, $user);
$this->afterSave($registration, $user);
return array($user, $this->createPerInviteUser($registration, $user['id']));
}
/**
* 用于user_profile表
* key 为 $registration 内的属性名
* value = 默认值($registration内无属性,使用默认值)
*/
protected function getCreatedProfileFields()
{
return array(
'mobile' => '',
'idcard' => '',
'truename' => '',
'company' => '',
'job' => '',
'weixin' => '',
'weibo' => '',
'qq' => '',
'site' => '',
'gender' => 'secret',
);
}
/**
* 用于user表
* key 为 $registration 内的属性名
* value = 默认值($registration内无属性,使用默认值)
*/
protected function getCreatedUserFields()
{
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。