close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to check for logged in

Thread began 6/19/2010 11:58 pm by johnlanglois | Last modified 6/30/2010 6:04 pm by Eric Mittman | 814 views | 3 replies |

johnlanglois

How to check for logged in

Is there a way that we can add code to PowerCMS that would recognize whether the client was already logged in? At present, the client logs into the site for other purposes and then has to log in again to use PowerCMS.

What variables would need to be set?

Thanks.

Sign in to reply to this post

Eric Mittman

In order to bypass the login for the admin you just need to pass the restriction rules that are applied to the page. The main rule is for 'Administrator' and is setup like this:

session variable:
$_SESSION['AdminLogin']

This session variable must hold the password for the Admin user.


You can check the username or id after you login and if it is the admin username or id then you can store the password in this session variable.

Sign in to reply to this post

johnlanglois

It worked

Thank you, Eric.

That strategy worked. Is there a way to distinguish between a user level and an admin level doing that?

Sign in to reply to this post

Eric Mittman

This is kind of a custom technique to auto login the admin user so the regular access levels would not really apply. You could however have a recordset that selects the admin username and password from the wa_settings table and compare them to the value the user entered, if they are correct then store the password in the session variable. This is essentially what the login for the admin area is doing.

Sign in to reply to this post

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...