예제 #1
0
<?php

db_include('create_member');
if (!isset($_POST['email']) || !isset($_POST['password'])) {
    $display_message = 'No email address or password provided!';
    $redirect = '/user/accountform.php';
} else {
    $member_pk = create_member($_POST['email'], $_POST['firstname'], $_POST['lastname'], $_POST['password']);
    if ($member_pk) {
        $display_message = 'Successfully created account! You may log in now.';
        $redirect = '/index.php';
    } else {
        $display_message = "An account with the specified email - <b>{$_POST['email']}</b> - already exists!";
        $redirect = '/user/accountform.php';
    }
}
?>

<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Under the Couch - Creating Account...</title>
        <meta http-equiv="refresh" content="3;url=<?php 
echo $redirect;
?>
" />
        <link rel="stylesheet" type="text/css" href="/styles.css" />
    </head>

    <body>
예제 #2
0
 /**
  * When learning path roles get allocated in moodle, share mentors get allocated in rafl
  * You must call this function with an existing $courseid
  * @author David Drummond <*****@*****.**>, Daniel Dammann <*****@*****.**>
  */
 function update_share_contributors($courseid, $useridarray)
 {
     delete_records("rafl_share_mentor", "share_mentor_share", $courseid);
     $row = get_record("rafl_share", "share_id", $courseid);
     if (!$row) {
         trigger_error("You have tried allocating commentators to a rafl share that doesn't exist.");
     } else {
         foreach ($useridarray as $userid) {
             create_member($userid);
             $sharementor = new object();
             $sharementor->share_mentor_share = $courseid;
             $sharementor->share_mentor_mentor = $userid;
             $sharementor->share_mentor_member = $row->share_member;
             $sharementor->share_mentor_status = 'OLD';
             // WARNING: Work around "primary-key" enforcement in dmlib.php
             insert_record('rafl_share_mentor', $sharementor, false, 'share_mentor_id');
         }
     }
 }
예제 #3
0
/**
 * create a new member and let it demand offline voting for the supplied proposal
 *
 * @param Proposal $proposal
 * @param string  $i
 */
function add_votingmode_demander(Proposal $proposal, $i) {
	create_member("user".$i);
	$proposal->issue()->demand_votingmode();
}
예제 #4
0
/**
 * Creates an inactive organization member.
 */
function create_organization($org)
{
    foreach (get_organization_fields() as $field) {
        ${$field} = $org[$field];
    }
    $org = create_member($org);
    $sql = "insert into organization (\n        member_id,\n        name\n        ) values (\n        {$org['id']},\n        '{$name}')";
    member_query($sql);
    return $org;
}
예제 #5
0
                $newuser->timezone = '99';
                $newuser->mailformat = 1;
                $newuser->maildigest = 0;
                $newuser->maildisplay = 2;
                $newuser->htmleditor = 1;
                $newuser->ajax = 1;
                $newuser->autosubscribe = 1;
                $newuser->timemodifed = time();
                if (!insert_record('user', $newuser)) {
                    $errors .= "insert failed for user with email:" . $rec['email'] . "</br>";
                }
                $user = get_record('user', 'email', $rec['email']);
                // local_user_signup($user); //disable as we might not want to force a password change
                //do normal role ass as would be done in local_user_signup
                $ptrole = get_field('role', 'id', 'shortname', ROLE_PT);
                $sitecontext = get_context_instance(CONTEXT_COURSE, SITEID);
                role_assign($ptrole, $user->id, 0, $sitecontext->id);
                $count++;
            } else {
                $errors .= 'Username: '******'login'] . ' already exists, so did not import!</br>';
            }
        } else {
            $user = get_record('user', 'email', $rec['email']);
            create_member($user->id);
            $errors .= 'User with email: ' . $rec['email'] . ' already exists, so did not import!</br>';
        }
    }
}
notify("(" . $count . ") Users imported successfully!", 'notifysuccess');
notify($errors);
print_footer();
예제 #6
0
        if (no_caps_pass($_POST['member_register_password'])) {
        	$member_register_errors[] = translate_error('no_caps_pass');
        }
        if (no_symbol_pass($_POST['member_register_password'])) {
        	$member_register_errors[] = translate_error('no_symbol_pass');
        }
        */
        if (not_match_pass($_POST['member_register_password'], $_POST['member_register_repeat_password'])) {
            $member_register_errors[] = translate_error('not_match_pass');
        }
        if (invalid_dob($_POST['member_register_dob'])) {
            $member_register_errors[] = translate_error('invalid_dob');
        }
    }
    if (!count($member_register_errors)) {
        create_member($_POST['member_register_email'], $_POST['member_register_fullname'], $_POST['member_register_password'], $_POST['member_register_dob'], $lang_code);
        email_create_member($_POST['member_register_email'], $_POST['member_register_fullname'], $_POST['member_register_password'], $_POST['member_register_dob']);
        header('Location: http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://nhipsinhhoc.vn/member/login/?registered=✓');
    }
}
?>
<form id="register_form" method="POST" action="">
	<div class="m-input-prepend">
		<span class="add-on"><?php 
echo translate_span('email');
?>
</span>
		<input class="m-wrap required" size="20" type="text" name="member_register_email" placeholder="*****@*****.**" value="<?php 
echo $inputted_email;
?>
" tabindex="1" required>