Commit 16735b04 by Scott

Copy unmerged changes to Controllers

parent 7597bced
......@@ -115,8 +115,8 @@ class UserProfile extends \Q2A\Controllers\BaseController
if (isset($loginuserid) && $loginuserid != $userid &&
($loginlevel >= QA_USER_LEVEL_SUPER || $loginlevel > $maxuserlevel) &&
!qa_user_permit_error()
) { // can't change self - or someone on your level (or higher, obviously) unless you're a super admin
) {
// can't change self - or someone on your level (or higher, obviously) unless you're a super admin
if ($loginlevel >= QA_USER_LEVEL_SUPER) {
$maxlevelassign = QA_USER_LEVEL_SUPER;
} elseif ($loginlevel >= QA_USER_LEVEL_ADMIN) {
......@@ -194,9 +194,11 @@ class UserProfile extends \Q2A\Controllers\BaseController
if (isset($useraccount['avatarblobid'])) {
require_once QA_INCLUDE_DIR . 'app/blobs.php';
qa_db_user_set($userid, 'avatarblobid', null);
qa_db_user_set($userid, 'avatarwidth', null);
qa_db_user_set($userid, 'avatarheight', null);
qa_db_user_set($userid, array(
'avatarblobid' => null,
'avatarwidth' => null,
'avatarheight' => null,
));
qa_delete_blob($useraccount['avatarblobid']);
}
}
......@@ -606,7 +608,7 @@ class UserProfile extends \Q2A\Controllers\BaseController
$htmlemail = qa_html(isset($inemail) ? $inemail : $useraccount['email']);
$qa_content['form_profile']['fields']['email'] = array(
'type' => $userediting ? 'text' : 'static',
'type' => $userediting ? 'email' : 'static',
'label' => qa_lang_html('users/email_label'),
'tags' => 'name="email"',
'value' => $userediting ? $htmlemail : ('<a href="mailto:' . $htmlemail . '">' . $htmlemail . '</a>'),
......
......@@ -190,7 +190,7 @@ class UsersList extends \Q2A\Controllers\BaseController
'items' => array(),
'rows' => ceil($pageSize / qa_opt('columns_users')),
'type' => 'users',
// 'sort' => '',
// 'sort' is handled by calling code
);
foreach ($users as $user) {
......@@ -219,9 +219,7 @@ class UsersList extends \Q2A\Controllers\BaseController
$content['page_links'] = qa_html_page_links($request, $start, $pageSize, $totalUsers, qa_opt('pages_prev_next'));
// set the canonical url based on possible pagination
$params = $start > 0 ? array('start' => $start) : null;
$content['canonical'] = qa_path_html($request, $params, qa_opt('site_url'));
$content['canonical'] = qa_get_canonical();
$content['navigation']['sub'] = qa_users_sub_navigation();
......
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