if ( $confirmation == 0 ) {
$user->confirmed = 1;
} else {
$user->confirmed = 0;
}
if ( $confirmation == 0 ) {
$user->confirmed = 0;
} else {
$user->confirmed = 0;
}
function registerUser( $fname, $lname, $email, $username, $password, $cb_profiletype, $approve = 0, $confirm = 0 ) {
global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS;
$approval = ( $approve == 2 ? $ueConfig['reg_admin_approval'] : $approve );
$confirmation = ( $confirm == 2 ? $ueConfig['reg_confirmation'] : $confirm );
$usertype = $_CB_framework->getCfg( 'new_usertype' );
$user = new moscomprofilerUser( $_CB_database );
$user->usertype = ( $usertype ? $usertype : 'Registered' );
$user->gid = $_CB_framework->acl->get_group_id( $user->usertype, 'ARO' );
$user->gids = array( $user->gid );
$user->sendEmail = 0;
$user->registerDate = date( 'Y-m-d H:i:s', $_CB_framework->now() );
$user->name = $fname . ' ' . $lname;
$user->firstname = $fname;
$user->lastname = $lname;
$user->username = $username;
$user->email = $email;
$user->password = $user->hashAndSaltPassword( $password );
$cb_profiletype = "fan-profile";
$user->cb_profiletype = $cb_profiletype;
$user->registeripaddr = cbGetIPlist();
...
...
$cb_profiletype = "fan-profile";
$user->cb_profiletype = $cb_profiletype;
Please Log in to join the conversation.
Please Log in to join the conversation.
if ( $user->confirmed == 0 ) {
if ( $user->checkActivationCode( $confirmcode ) ) {
// THIS is the normal case: user exists, is not yet confirmed, and confirmation code does match:
$messagesToUser = null;
$confirmed = $user->confirmUser( $messagesToUser );
} else {
// confirmation code does not match:
$messagesToUser = array( _UE_WRONG_CONFIRMATION_CODE );
$confirmed = false;
}
}
..
..
Please Log in to join the conversation.
Please Log in to join the conversation.
No, that's not what you need to do. Please see the below original tutorial.I am trying to set $user->confirmation=1; at several places at first of registerUser function with no success.
function registerUser( $fname, $lname, $email, $username, $password, $approve = 0, $confirm = 0 ) {
global $_CB_framework, $_CB_database, $ueConfig, $_PLUGINS;
$approval = ( $approve == 2 ? $ueConfig['reg_admin_approval'] : $approve );
$confirmation = ( $confirm == 2 ? $ueConfig['reg_confirmation'] : $confirm );
$usertype = $_CB_framework->getCfg( 'new_usertype' );
$user = new moscomprofilerUser( $_CB_database );
$user->usertype = ( $usertype ? $usertype : 'Registered' );
$user->gid = $_CB_framework->acl->get_group_id( $user->usertype, 'ARO' );
$user->gids = array( $user->gid );
$user->sendEmail = 0;
$user->registerDate = date( 'Y-m-d H:i:s', $_CB_framework->now() );
$user->name = $fname . ' ' . $lname;
$user->firstname = $fname;
$user->lastname = $lname;
$user->username = $username;
$user->email = $email;
$user->password = $user->hashAndSaltPassword( $password );
$user->registeripaddr = cbGetIPlist();
if ( $approval == 0 ) {
$user->approved = 1;
} else {
$user->approved = 0;
}
if ( $confirmation == 0 ) {
$user->confirmed = 1;
} else {
$user->confirmed = 0;
}
if ( ( $user->confirmed == 1 ) && ( $user->approved == 1 ) ) {
$user->block = 0;
} else {
$user->block = 1;
}
$_PLUGINS->trigger( 'onBeforeUserRegistration', array( &$user, &$user ) );
if ( $user->store() ) {
if ( ( $user->confirmed == 0 ) && ( $confirmation != 0 ) ) {
$user->_setActivationCode();
if ( ! $user->store() ) {
return false;
}
}
$_PLUGINS->trigger( 'onAfterUserRegistration', array( &$user, &$user, true ) );
return true;
}
return false;
}
registerUser( 'test', '123', 'fake@cb.invalid', 'testuser', '12345678', 0, 1 );
No, we do not have such a service.Is there anyone at joomlapolis.com that i could pay him/her as custom work, in order to give credentials and look through this problem to fix this?
Please Log in to join the conversation.
Please Log in to join the conversation.