The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 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!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect Question
#1
Actually I have 2 questions.

I've setup Redirect on Login, which is working fine.  I'm redirecting to a php page.  The problem I have is if a user clicks on their account setting link, then click on the home button, they aren't getting redirected.  They are getting sent to the original index.php.  Is there anything that is can be done to prevent this from happening?  I don't know if I can modify the index file or if I can change the destination url of the Home button.  I've looked all over the place, but can't find where I would change the Home button's url.

My second question... Is there anyway to remove the first name, last name, and email input fields when a user registers?  Is there a way to only have the username, password, re-enter password input fields to be the only inputs visible and required to create any account?


Thank you for any help in advance.
  Reply
#2
(05-04-2019, 01:02 PM)epicmedia Wrote: Actually I have 2 questions.

I've setup Redirect on Login, which is working fine.  I'm redirecting to a php page.  The problem I have is if a user clicks on their account setting link, then click on the home button, they aren't getting redirected.  They are getting sent to the original index.php.  Is there anything that is can be done to prevent this from happening?  I don't know if I can modify the index file or if I can change the destination url of the Home button.  I've looked all over the place, but can't find where I would change the Home button's url.

My second question... Is there anyway to remove the first name, last name, and email input fields when a user registers?  Is there a way to only have the username, password, re-enter password input fields to be the only inputs visible and required to create any account?


Thank you for any help in advance.

The index.php page is yours to modify however you want.  You can redirect them just with a simple redirect::to('thispage.php'); or you can get more fancy like 
if(hasPerm([2],$user->data()->id)){ //admins
redirect::to('thispage.php'); 
}

As far as the join thing goes, I can't think of a really easy way to do that. My thought would be to copy join.php to usersc/join.php and also make a copy of users/views/_join.php (it doesn't matter where you put it, you can keep it in users).  Maybe call it _joinepic.php


The in usersc/join.php make sure you're calling the view _joinepic.php

There are a few other things to consider. 
1.  settings->general, change the echouser function to be username (since you won't have a first/last name).  
2.  On usersc/join.php you will want to change lines 70-72 to 
        $fname = "";
        $lname = "";
        $email = randomstring(50)."@yourdomain.com";

so someone can't do a password reset.  In fact they won't be able to do a password reset on their own without an email.
3. Lower down, just go ahead and remove this chunk
          'fname' => array(
                'display' => lang("GEN_FNAME"),
                'required' => true,
                'min' => 1,
                'max' => 60,
          ),
          'lname' => array(
                'display' => lang("GEN_LNAME"),
                'required' => true,
                'min' => 1,
                'max' => 60,
          ),
          'email' => array(
                'display' => lang("GEN_EMAIL"),
                'required' => true,
                'valid_email' => true,
                'unique' => 'users',
          ),


That's a start.  Hope it helps.
  Reply
#3
Thank you for taking the time for that advice. I really appreciate it. I'm brand new to this cms, so still working on figuring out the whole thing.
  Reply
#4
Absolutely. We're happy to help. Let us know if there's anything else we can do.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)