Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
16735b04
Commit
16735b04
authored
Jan 15, 2019
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy unmerged changes to Controllers
parent
7597bced
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
UserProfile.php
qa-src/Controllers/User/UserProfile.php
+8
-6
UsersList.php
qa-src/Controllers/User/UsersList.php
+2
-4
No files found.
qa-src/Controllers/User/UserProfile.php
View file @
16735b04
...
...
@@ -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>'
),
...
...
qa-src/Controllers/User/UsersList.php
View file @
16735b04
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment