The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/portal.php 39 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,007
» Latest member: kavitasinghji
» Forum threads: 1,324
» Forum posts: 7,788

Full Statistics

Online Users
There are currently 449 online users.
» 0 Member(s) | 447 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

 
  SMTP via Mandrill
Posted by: bucksuper - 10-11-2018, 09:36 PM - Forum: UserSpice 4.3 and Below - Replies (1)

I'm having trouble sending test email using mandrill. I've set isSMTP to Yes. 

The error I get is: 

"2018-10-11 21:38:26 SMTP ERROR: Failed to connect to server: Connection refused (111) SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/w...leshooting"

Have you seen users configuring Mandrill succesfully?

Thanks in advance.


  Login
Posted by: KyleJ1445566 - 10-11-2018, 05:54 PM - Forum: UserSpice 4.4 - Replies (3)

Hey,

I am new at mysql and PHP and for some reason I just can't get the hang of it, because I already have got a website designed with a standard login form and I want user's to be able to also login to my website using there userspace login details and if they happen to navigate back to my website then it will say welcome (Username) at the top right hand corner. I home this is possible and if so how would i go about doing something like this.



Help is appreciated and thanks in advance.


  Option to Insert record in admin_user.php
Posted by: eforbes - 10-11-2018, 09:26 AM - Forum: UserSpice 4.3 and Below - Replies (8)

I want to insert a record in a table on the admin_user.php page.
The option is located in the Misc Settings modal dialog box right beside the Delete user option.
(Between Lines 610 - 650)


The code is as follows:


 <label>Clone this User?
      <input type='checkbox' name='clone[<?php echo "$userId"; ?>]' id='clone[<? echo "$userId"; ?>]' value='<?php echo "$userId"; ?>' <?php if (!checkMenu(2,$user->data()->id) || $userId == 1){  ?>disabled<?php } ?>></label>
      </div>



(Between lines 50 - 60) under the "Form posted" section, right beneath the deletion Post, the code is as follows:

 if(!empty($_POST['clone'])){

    $db->insert("members", ["memberid"=>$userId]);

    }

When I click the update button, nothing is going to the database. I use the dnd($variable); and i see the value of the userId but I have no idea why that record is not inserted.

Need some help urgently!!!!!!!!!!!


  securing url id's
Posted by: eforbes - 10-10-2018, 09:53 PM - Forum: UserSpice 4.3 and Below - Replies (3)

I am really concerned about showing url id's to view details for a product that i am setting up.  Is there a way in US to hide or make it more secure?

This is what i have:  <a href="product_details.php?transac_id=<?php echo $product['id']?>">Product Name</a>


  Users Only
Posted by: KyleJ1445566 - 10-10-2018, 03:27 AM - Forum: UserSpice 4.4 - Replies (5)

Hey,

I am trying to get the some of the content on the index page for logged in users only and I am having difficulty. I have supplied a screen shot of the content I wish for only logged in users.

Any help would be appreciated and thank you in advance.


  More modular
Posted by: jtullett - 10-09-2018, 09:42 PM - Forum: UserSpice 5 - Roadmapping the Future - Replies (3)

I've only been using US for a few days (and liking it a LOT), so this may be way off base especially if a lot of it is already available/in the works, but my early observations are that UserSpice a) does a great job of covering the bases it says it will, and b) does get in the way a bit.

What I mean is, there are quite a lot of areas where I feel I HAVE to edit files in /users or /usersc, even though that's really not a good idea. 

(Aside: why two directories anyway? I'd rather see all the US core stuff in one folder, and everything a user is likely to edit in another, but even then I'd rather they be under a single folder because I'm a neatness freak Smile)

For example, I want to disable the ability of site visitors to list all subscribers, but the only way to do that is to hack it out of the php. This isn't really a criticism of US since it's not hard to make those edits directly, but if there were a more cleanly defined module approach, it wouldn't need tweaking at code level, and it would make extensibility easier. There are other small examples - again, nothing serious, but it feels like it's due for a bit of a cleanup.

For another - US outputs the entire header and then the start of the body, in one go. I may have overlooked it, but I can't find a way for me to add headers, js/css includes, and so on, without directly editing header.php. I'd really like to be able to affect that directly from within files, because I don't always want the includes. Maybe provide a US equivalent of header() so pages can inject header material before the page renders?

I'd also like to be able to do multi-project management, with users and pages grouped per project, and role-based management including project-limited access. And while I'm thinking about that, I'd also like to be able to include user template files, on a per-project basis. I use global php classes, and I'd quite like to be able to say "For all files in this project, include that file." You may have to resolve issues like conflicting versions of jquery though.

Lastly - the video of "how to do a minimal use" Honey Badger site looks out of date. Far as I can see, all you need to invoke US is this:

Code:
require_once 'users/init.php';
if (!securePage($_SERVER['PHP_SELF'])){die();}

Which is pretty darned lean, and I really like that minimalist approach. I have to ask, though, why isn't the second line just moved to init.php? Given that you always want it to be present, it kinda looks like the single require_once line should be all you really need. (One line, for a complete user management backend? That's neat.)

All of this is fairly minor though. I'm liking how US (mostly) takes care of the messy user management stuff and lets me focus on rolling out pages. And that's really the win for me, in a nutshell; just let me focus on my stuff, and take care of your stuff. So a non-function suggestion would be to focus some of the documentation on exactly that. The docs are good from a technical standpoint, but could maybe do with some more focus on the use-case stuff.

Thanks for a great project. Glad I found it!


  List available pages for a user
Posted by: jtullett - 10-09-2018, 09:13 PM - Forum: Modifications and Hackery - Replies (1)

This is a pretty ugly piece of hackery, so I'm hoping there's some sort of award.

I had a request from a user for a page to list other pages he was authorized to use. So I came up with this:

Code:
if ($user->data()->id) {
    $pageQuery = "SELECT DISTINCT `pages`.`page`, `pages`.`title` FROM `user_permission_matches` RIGHT JOIN `users` on `user_permission_matches`.`user_id`=`users`.`id` RIGHT JOIN `permission_page_matches` ON `user_permission_matches`.`permission_id`=`permission_page_matches`.`permission_id` RIGHT JOIN `pages` ON `pages`.`id`=`permission_page_matches`.`page_id` WHERE `users`.`id`= ? AND `title` LIKE 'PROJECT-PREFIX %'";
    $db->query($pageQuery, [$user->data()->id]);
    foreach ($db->results() as $page) {
        // Build a piece of HTML out of $page->page and $page->title
        // For bonus nastiness I check for <pagename>.png to use as an icon. Fugly but consistent ftw.
    }
}

Each page title already has a project prefix, so basically I'm just asking for a list of pages with that title, and matching uid->permission. There's no sorting, which may or may not be a problem at some stage.

I'm sure there's a much more elegant way, so suggestions are welcome!


  Any way to disable bios?
Posted by: jtullett - 10-08-2018, 10:51 AM - Forum: UserSpice 4.3 and Below - Replies (5)

Hi

I don't want my users to be able to see the full list of registered users - it's a privacy issue [1]. I could edit the user profile pages, but an upgrade could easily change them back (and yes, I can make them read only, but even so there's no guarantee the filename won't change...), so I'd be happier knowing there's an option for it. Is there?

Jon


[1] Anyone who knows the US structure can guess their way to https://userspice.com/bugs/users/view_all_users.php for eg.


  New pages are immediate deleted
Posted by: jtullett - 10-08-2018, 10:27 AM - Forum: UserSpice 4.3 and Below - Replies (6)

Hi guys

I've logged this as bug #334 (https://userspice.com/bugs/usersc/issue_...php?id=334), not sure whether I should post it here too.

Likely a config error on my part, but the UserSpice page database seems to carefully maintain itself, and remove any pages I add! Whenever I add a page to it, either through navigating to the page and using the form, or manually in the database, the page is automatically removed the moment I browse to the page management page in UserSpice. Only that page - the page entry works normally, but visit the page management page, and new pages are deleted.

Tried a fresh install, but it still happens. What am I doing wrong?
Jon


  Inserting records failed
Posted by: vkkan - 10-07-2018, 12:52 PM - Forum: UserSpice 4.3 and Below - Replies (1)

Hi Folks,

I have created form using form builder and this form has to be accessed by the users without login and submit the form and the same has to be saved inside the db but so far its not happening.

form posting php as follows i.e. abc.php

<?php require_once './users/init.php'; ?>
<?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
<?php require_once $abs_us_root.$us_url_root.'users/includes/navigation.php'; ?>
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>


<div id="page-wrapper">
<div class="container">
<?php

if($_POST){
   //print_r($_POST);exit;

   $db = DB::getInstance();


[font=Droid Sans Mono]
    try {
       // echo "Trying to create user";
       $fields=array(
[/font]

[font=Droid Sans Mono][font=Droid Sans Mono]         'var1' => Input::get('[font=Droid Sans Mono]var1'),
         'var2' => ucfirst(Input::get('var2')),
         'var3' =>  Input::get('var3'),[/font]
[/font]
[/font]

[font=Droid Sans Mono][font=Droid Sans Mono]       );
       print_r($fields);
       var_dump($db);
       $db->insert('tablename',$fields) or die("not able to create record");exit;
       $theNewId=$db->lastId();
[/font]
[/font]

[font=Droid Sans Mono][font=Droid Sans Mono]}[/font][/font]
[font=Droid Sans Mono][font=Droid Sans Mono][font=Droid Sans Mono]displayForm('abcform');[/font][/font][/font]
[font=Droid Sans Mono][font=Droid Sans Mono]abc.php has be defined as public and error I am getting as follows[/font][/font]

[font=Droid Sans Mono][font=Droid Sans Mono]object(DB)#8 (9) { ["_pdo":"DB":private]=> object(PDO)#6 (0) { } ["_query":"DB":private]=> object(PDOStatement)#32 (1) { ["queryString"]=> string(50) "SELECT id, page, private FROM pages WHERE page = ?" } ["_error":"DB":private]=> bool(false) ["_errorInfo":"DB":private]=> array(3) { [0]=> int(0) [1]=> NULL [2]=> NULL } ["_results":"DB":private]=> array(1) { [0]=> object(stdClass)#31 (3) { ["id"]=> string(2) "87" ["page"]=> string(14) "abc.php" ["private"]=> string(1) "0" } } ["_resultsArray":"DB":private]=> array(1) { [0]=> array(3) { ["id"]=> string(2) "87" ["page"]=> string(14) "abc.php" ["private"]=> string(1) "0" } } ["_count":"DB":private]=> int(1) ["_lastId":"DB":private]=> string(1) "0" ["_queryCount":"DB":private]=> int(51) } not able to create record[/font][/font]

[font=Droid Sans Mono][font=Droid Sans Mono]I am struck here please someone help me[/font][/font]