move core profile fields into users table

this change will fix the problems with the userProfileData table being
way too big. it also simplifies many basic user search tasks, not
needing to join the userProfileData table
This commit is contained in:
Doug Bell 2010-12-03 22:36:30 -06:00
parent f43541c5c9
commit 2c51e6d4fd
15 changed files with 129 additions and 53 deletions

View file

@ -735,7 +735,7 @@ sub www_saveSettings {
# Reset login message seen numbers
if ( $session->form->get( 'showMessageOnLoginReset' ) ) {
$session->db->write(
"UPDATE userProfileData SET showMessageOnLoginSeen=0"
"UPDATE users SET showMessageOnLoginSeen=0"
);
$session->cache->clear;
}

View file

@ -227,10 +227,9 @@ sub doUserSearch {
$keyword = "%".$keyword;
}
my $sql = "select users.userId, users.username, users.status, users.dateCreated, users.lastUpdated,
userProfileData.email from users
left join userProfileData on users.userId=userProfileData.userId
users.email from users
where $selectedStatus and (users.username like ? or alias like ? or email like ?
or firstName like ? or lastName like ?)
or firstName like ? or lastName like ? or CONCAT(firstName, ' ', lastName) LIKE ? )
and users.userId not in (".$session->db->quoteAndJoin($userFilter).") order by users.username";
if ($returnPaginator) {
my $p = WebGUI::Paginator->new($session,$session->url->page("op=".$op));