common/services/entities/UserService.php
public function register( $model, $config = [] ) {

		$status	= isset( $config[ 'status' ] ) ? $config[ 'status' ] : User::STATUS_NEW;
		$user	= isset( $config[ 'user' ] ) ? $config[ 'user' ] : $this->getModelObject();

		$date	= DateUtil::getDateTime();

		$user->email		= $model->email;
		$user->username		= $model->username;
		$user->title		= $model->title;
		$user->firstName	= $model->firstName;
		$user->middleName	= $model->middleName;
		$user->lastName		= $model->lastName;
		$user->mobile		= $model->mobile;
		$user->dob			= $model->dob;
		$user->registeredAt	= $date;
		$user->status		= $status;
		$user->type			= $model->type;

		$user->generatePassword( $model->password );
		$user->generateVerifyToken();
		$user->generateAuthKey();
		$user->generateOtp();

		$user->save();

		return $user;
	}
public function register( $model, $config = [] ) {

		$status	= isset( $config[ 'status' ] ) ? $config[ 'status' ] : User::STATUS_NEW;
		$user	= isset( $config[ 'user' ] ) ? $config[ 'user' ] : $this->getModelObject();

		$date	= DateUtil::getDateTime();

		$user->email		= $model->email;
		$user->username		= $model->username;
		$user->title		= $model->title;
		$user->firstName	= $model->firstName;
		$user->middleName	= $model->middleName;
		$user->lastName		= $model->lastName;
		$user->mobile		= $model->mobile;
		$user->dob			= $model->dob;
		$user->registeredAt	= $date;
		$user->status		= $status;
		$user->type			= $model->type;

		$user->generatePassword( $model->password );
		$user->generateVerifyToken();
		$user->generateAuthKey();
		$user->generateOtp();

		$user->save();

		return $user;
	}
public function register ( $ model , $ config = [ ] ) { $ status = isset ( $ config [ 'status' ] ) ? $ config [ 'status' ] : User :: STATUS_NEW ; $ user = isset ( $ config [ 'user' ] ) ? $ config [ 'user' ] : $ this -> getModelObject ( ) ; $ date = DateUtil :: getDateTime ( ) ; $ user -> email = $ model -> email ; $ user -> username = $ model -> username ; $ user -> title = $ model -> title ; $ user -> firstName = $ model -> firstName ; $ user -> middleName = $ model -> middleName ; $ user -> lastName = $ model -> lastName ; $ user -> mobile = $ model -> mobile ; $ user -> dob = $ model -> dob ; $ user -> registeredAt = $ date ; $ user -> status = $ status ; $ user -> type = $ model -> type ; $ user -> generatePassword ( $ model -> password ) ; $ user -> generateVerifyToken ( ) ; $ user -> generateAuthKey ( ) ; $ user -> generateOtp ( ) ; $ user -> save ( ) ; return $ user ; }
Register User - It register the user and set status to new. It also generate verification token.

@param RegisterForm $model
@return User
Register User - It register the user and set status to new . It also generate verification token .