Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 458 online users. » 0 Member(s) | 456 Guest(s) Bing, Google
|
Latest Threads |
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
|
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
|
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
|
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
|
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
|
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
|
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
|
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
|
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
|
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232
|
|
|
Couple Audit Queries |
Posted by: Brandin - 04-18-2017, 11:59 AM - Forum: Modifications and Hackery
- No Replies
|
|
Hello,
Here is a couple audit queries I have written over the past few months to keep an eye on your Database:
Page does not exist but permission_page_matches does
Code: SELECT * FROM permission_page_matches WHERE page_id NOT IN (SELECT id FROM pages)
DELETE query:
Code: DELETE FROM permission_page_matches WHERE page_id NOT IN (SELECT id FROM pages)
User does not exist but items still in
Create a table (mine is called ), I also have an "active" column defining if the table is to be checked, and the as I have multiple crons, you can call this UID (and use it for this audit and the next) or RDU (and use it for this audit only)
Run query to pull crontables:
Code: SELECT * FROM crontables WHERE active = 1 AND crontype='uid'
Then run the RDU query:
<pre>Code: SELECT *
FROM $crontable
WHERE $crontable.user_id NOT IN (SELECT users.id FROM users)
</pre>
(you will have to do the conversion to PDO if you wish to use this)
DELETE query:
Code: DELETE FROM $crontable WHERE $crontable.user_id NOT IN (SELECT users.id FROM users)
(you will have to convert to PDO if you wish to use this)
Missing User ID (make your user_id columns!)
Setup your crontables like above, and run the crontable query for
Query:
<pre>Code: SELECT *
FROM $crontable
WHERE user_id IN ('',0)
OR user_id IS NULL
</pre>
DELETE query:
Code: DELETE FROM $crontable WHERE user_id IN ('',0) OR user_id IS NULL
(convert to PDO if you wish to use)
Duplicate Page Permissions
If you are like me, and assign certain pages only to 1 permission (and then assign each type of permission, e.g. user manager, system manager, user) then you can use this to find duplicate entries.
Code: SELECT *FROM permission_page_matches GROUP BY page_id HAVING COUNT(*) > 1
Another modification I made to control this duplicate page permissions audit was to change the admin_page.php and the admin_permission.php pages so you can only assign one permission per page, see the changes below:
Add your Count Query:
Code: $countQ = $db->query("SELECT id, permission_id FROM permission_page_matches WHERE page_id = ? ",array($pageId));
Code: $countCountQ = $countQ->count();
Change your Add Access panel (Around line 258):
https://hastebin.com/kolewiwovu.js
This will change the checkboxes under add to radios, so you can only select one, and once you add it, it will not allow you to add more, either outputting the maximum 1 is reached, or you have reached an illegal amount (greater than 1, less than 0 soemhow lol)
Code: admin_permission.php
Change your Add Access To This Level paragraph around line 294 to:
https://hastebin.com/girezojedo.xml
This will disallow adding of any private pages that have a count of at least one in Code: permission_page_matches
I will add more audits as I make them!
I hope this helps some of you keep an eye on your database and UserSpice system!
|
|
|
name_from_id |
Posted by: Brandin - 04-18-2017, 11:41 AM - Forum: UserSpice 4.3 and Below
- Replies (3)
|
|
Hello,
The function is putting a capital letter for the first character, however the first letter in my username is not capital. How can I reverse this in the function or have it not do this in the first place? I am okay with making a custom function I just can't figure out why it is doing this in the first place.
Thank you.
|
|
|
4.2.5 user_settings.php error |
Posted by: muhammedc - 04-18-2017, 06:26 AM - Forum: UserSpice 4.3 and Below
- Replies (1)
|
|
Hi
After update, I am getting this error on user_settings.php:
Code: Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\Userspice\users\user_settings.php on line 217
Is this problem just localised on my end - or is anyone else having the error?
Any ideas?
|
|
|
MD5 password Login |
Posted by: Jamie - 04-17-2017, 03:04 AM - Forum: UserSpice 4.3 and Below
- Replies (26)
|
|
Hello,
So I'm trying to get the login page to allow md5 password logins, I'm integrating a database of over 3,000 users and we're still using md5 hashing (yes I know, not the most secure thing), but I'm hoping with UserSpice I can shortly do things such as integrate bcrypt etc...
At the moment I have to stick to MD5 hashing, I'm unable to get it to allow me to login with MD5, no matter what modifications I make, please could you point me the correct codes to change to get md5 passwords to work in the login form, I've gotten them to function on other pages such as registration etc..
|
|
|
user_settings.php error |
Posted by: Brandin - 04-16-2017, 03:57 PM - Forum: UserSpice 4.3 and Below
- Replies (18)
|
|
Hello,
4.2.4 is giving me an error on user_settings.php:
Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/aircentralized/public_html/boss/users/user_settings.php on line 217
Thank you!
|
|
|
Thanks to Mudmin! |
Posted by: Brandin - 04-16-2017, 03:50 PM - Forum: New to UserSpice?
- Replies (1)
|
|
Mudmin,
Just wanted to pass along my thanks from myself and the rest of the UserSpice Community for the work you do, always being there to support our projects and help us work through problems! We appreciate everything you do!
Enjoy your next few months being busy! Be sure to spend time focusing on yourself too!
-Brandin
|
|
|
Connecting Multiple Installations |
Posted by: Brandin - 04-15-2017, 01:26 PM - Forum: Modifications and Hackery
- Replies (9)
|
|
Hello,
Another big project of mine I am going to work on!
***YOU CAN SKIP TO MY NEXT STARS IF YOU DON'T WANT TO FULLY UNDERSTAND WHAT'S GOING ON AND TRY TO ANSWER THE QUESTION***
I have a few systems I have designed, all on different subdomains:
-templates.*.com
-search.*.com
-boss.*.com
BOSS is my UserSpice installation I have fully customized to be a tracking solution for our Call Centre. I have finally converted the majority of my scripts to PDO using the UserSpice system, but I am still working on it.
I am starting to redesign the templates.*.com site which is a page of email templates, with information pulled from the table to design the tabs, and the table to have the templates.
Since I am redesigning it (from ground up) I might as well do the PDO conversion now, rather than recode it, and do it later, and I find PDO to be very easy to us. However, I love the functions built into the UserSpice software, and would like to use that in the templates site too.
***SKIP TO HERE***
I am running into a problem including init and header on a different subdomain, since it is using the abs_root and other applicable things that is relying on the subdomain to be the same as BOSS, but it is not. So, I reverted to doing an extra installation of UserSpice, connected to the same database, but it didn't like this and screwed up the pages system, most likely because there was two page functions running in different domains.
I have since decided to scrap that idea, and have two separate installations of UserSpice, with two different databases, but then I run into this issue:
In BOSS, I have a system called "External Management", this is what I use to control the templates and categories, and I don't want to recode it. I have a Requests Management System, the whole nine yards, if templates and categories tables are going to be in a different database, how am I going to get UserSpice to talk to that one? And I will then have to make custom functions to talk to it, won't I?
Is there any easier solution to my problem that I just can't think of?
Thank you in advance!
|
|
|
email and utf-8 |
Posted by: Popkultur - 04-13-2017, 02:23 PM - Forum: UserSpice 4.3 and Below
- No Replies
|
|
Hello,
There seems to be a problem, when using the email function from userspice to send a mail, and the subject contains special characters, they are not submitted correctly. I think you need to tell phpmailer to use utf-8?
|
|
|
|