Commit 823385fe authored by Penny Leach's avatar Penny Leach

removed all instances of prefname -> preferredname

parent a951a3c1
......@@ -70,7 +70,7 @@ class Session {
'admin' => false,
'firstname' => '',
'lastname' => '',
'prefname' => '',
'preferredname' => '',
'email' => '',
'accountprefs' => array(),
'activityprefs' => array(),
......
......@@ -50,7 +50,6 @@ $offset = param_integer('offset', 0);
$data = search_user($query, $limit, $offset);
foreach ($data['results'] as &$result) {
// @todo should call magical display user function
$result['name'] = display_name($result);
unset($result['email']);
......@@ -58,7 +57,7 @@ foreach ($data['results'] as &$result) {
unset($result['username']);
unset($result['firstname']);
unset($result['lastname']);
unset($result['prefname']);
unset($result['preferredname']);
}
print json_encode($data);
......
......@@ -47,7 +47,7 @@ function form_render_userlist($element, Form $form) {
}
if (is_array($value) && count($value)) {
$members = get_records_select('usr','id IN (' . join(',',$value) . ')', null, '', 'id,firstname,lastname,prefname');
$members = get_records_select('usr','id IN (' . join(',',$value) . ')', null, '', 'id,firstname,lastname,preferredname');
foreach($members as &$member) {
$member = display_name($member);
......
......@@ -1008,7 +1008,7 @@ function site_menu() {
/**
* Always use this function for all emails to users
*
* @param object $userto user object to send email to. must contain firstname,lastname,prefname,email
* @param object $userto user object to send email to. must contain firstname,lastname,preferredname,email
* @param object $userfrom user object to send email from. If null, email will come from mahara
* @param string $subject email subject
* @param string $messagetext text version of email
......
......@@ -40,22 +40,22 @@ defined('INTERNAL') || die();
* offset => integer, // starting from which result
* results => array( // the result records
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* email => string,
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* preferredname => string,
* email => string,
* ),
* array(
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* prefname => string,
* email => string,
* id => integer,
* username => string,
* institution => string,
* firstname => string,
* lastname => string,
* preferredname => string,
* email => string,
* ),
* array(...),
* ),
......
......@@ -53,7 +53,7 @@ class PluginNotificationEmaildigest extends PluginNotification {
public static function send_digest() {
$users = array();
$sql = 'SELECT q.id, u.firstname,u.lastname,u.prefname,u.email,q.*,' . db_format_tsfield('ctime').'
$sql = 'SELECT q.id, u.firstname,u.lastname,u.preferredname,u.email,q.*,' . db_format_tsfield('ctime').'
FROM ' . get_config('dbprefix') . 'usr u
JOIN ' . get_config('dbprefix') . 'notification_emaildigest_queue q
ON q.usr = u.id
......@@ -65,11 +65,11 @@ class PluginNotificationEmaildigest extends PluginNotification {
$users[$queue->usr] = new StdClass;
$users[$queue->usr]->user = new StdClass;
$users[$queue->usr]->user->firstname = $queue->firstname;
$users[$queue->usr]->user->lastname = $queue->lastname;
$users[$queue->usr]->user->prefname = $queue->prefname;
$users[$queue->usr]->user->email = $queue->email;
$users[$queue->usr]->user->id = $queue->usr;
$users[$queue->usr]->user->firstname = $queue->firstname;
$users[$queue->usr]->user->lastname = $queue->lastname;
$users[$queue->usr]->user->preferredname = $queue->preferredname;
$users[$queue->usr]->user->email = $queue->email;
$users[$queue->usr]->user->id = $queue->usr;
$users[$queue->usr]->entries = array();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment