Login into CMSB from a webpage

4 posts by 2 authors in: Forums > CMS Builder
Last Post: June 2, 2019   (RSS)

By andreasml - March 29, 2019

Hi

I am trying to insert a login pair (username/password) in a webpage, other than the Login page of the CMSB. 

Just to make it clear. I have a website and I would like users to login into the CMSB through a login pair (Username / password) that will exist on a notification bar on the top of each page. Currently, I have added a link to the CMSB in the menu of the website, but it is a bit awkward for the user as he needs to navigate on the menu, to get into the CMSB. Just to mention, I have activated the Website Membership plugin.

Regards,

Andreas Lazaris

By andreasml - March 29, 2019

Hi again.

Well, I did something and it partially worked. I am sure that there must be other more orthodox ways to do it. 

In particular: I copied the user-login.php file on the area of the webpage I wanted the login pair (username / password) to appear. Then, in the Websitemembership.php file, I changed the "yourRedirectAfterLoginPageHere.php" with the url of the initial page of the CMSB where I wanted to direct the login page. Finally I made some html changes on the user-login.php file.

It almost works fine. Although, it redirects exactly on the first page of the CMSB, there is appeared the following notice just above the input text boxes:

Notice: Undefined variable: CURRENT_USER in /var/www/vhosts/vascularregistry.gr/httpdocs/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(65) : eval()'d code on line 13

Are there any ideas how to dissapear this notice?

Regards

Andreas

By andreasml - June 2, 2019

The solution seems to be the following:

change

$CURRENT_USER

to

@$CURRENT_USER

Check also this: 

https://www.interactivetools.com/forum/forum-posts.php?postNum=2238440#post2238440