close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

split off registration - only two people can reg

Thread began 9/24/2010 11:52 am by Larry321390 | Last modified 2/14/2011 6:53 am by Jason Byrnes | 4109 views | 11 replies |

Larry321390

split off registration - only two people can reg

My client wants the president and treasurer to be the only people that can register members. No public registration.

I fixed the user_login.php file so only log-in is the only option. I removed the link to register.

Now I need the two people to be able to log in and register the new members after they pay their dues.

Please guide me to where to begin.

Thanks,
Larry

Sign in to reply to this post

Jason ByrnesWebAssist

have those two people login using the administrator user name and password that is set in the WA_Globlas.php file.


then add the admin access rule to the registration page:

php:
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>

<?php
if (!WA_Auth_RulePasses("Administrator")){
    
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
Sign in to reply to this post

Larry321390

"then add the admin access rule to the registration page:

PHP Code:.........."

I put the code after the the last "<?php require_once........." in users_Registration.php and users_Registration_Simple.php and loaded them to the server.

Then I added
<a href="../users_Registration.php">Register new member</a
to admin/index.php

It works just the way I wanted.

Thanks.
Larry

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post

Larry321390

I tried to do this again on a new site. However, when go from the Admin index.php to users_Registration.php I get the user log_in screen from the file users_LogIn.php.

users_Registration.php code in part line 10 to 18:

<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Adminstrator")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>
<?php
if (!function_exists("GetSQLValueString")) { ................................

Admin index.php code change:

<p><a href="../users_Registration.php">Full Register New Member</a> </p>
<p><a href="../users_Registration_Simple.php">Quick Registration New Member</a> </p>
<p><a href="users_Search.php">Search for user</a></p>
<p><a href="users_Report_Search.php">Filter report</a></p>
</body>

Thanks for the help.
Larry

Sign in to reply to this post

Jason ByrnesWebAssist

are you logged in as the administrator?

this code in the registration file is forcing it to only be available if your logged in as the admin:
<?php
if (!WA_Auth_RulePasses("Adminstrator")){
WA_Auth_RestrictAccess("users_LogIn.php");
}
?>

Sign in to reply to this post

Larry321390

screen shots

Yes I logged in as adminstrator

Admin

The screen shot is first log in .

After I logged in the 2nd screen shows.

after I click resgister the thrid screen shows up. This is the problem.

I should go straight to the registration page.

What else do I need to send you to find the problem?

Thanks
Larry

Sign in to reply to this post

Jason ByrnesWebAssist

send me the 2 login pages, the admin.index page and the registration page so in a zip archive so i can see the entire code in context rather than the small snippet.

Sign in to reply to this post

Larry321390

Zipped files are attached.

Larry

Attached Files
userregDownload2_10.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the problem is a syntax error on the registration page. in the if statement:

php:
if (!WA_Auth_RulePasses("Adminstrator")){



you are missing the second "i" in "Administrator"

it should be:

php:
if (!WA_Auth_RulePasses("Administrator")){




copy and paste is your friend.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...