<?php
chdir(dirname(__FILE__));
define("CONSOLE_MODE", true);
define('PUBLIC_FOLDER', 'public');
include "init.php";
header("Content-type: text/plain");

$admin = Contacts::findOne(array("conditions" => "user_type=1"));
CompanyWebsite::instance()->logUserIn($admin);
Env::useHelper('application');

$members = Members::findAll();
foreach ($members as $m) {
	$display_name = build_member_display_name($m);
	$m->setColumnValue('display_name', $display_name);
	$m->save();
}

