Recent Topics

Remove ability for public to login

Started by on Jun 22, 2017 – Contents updated: Jun 27, 2017

Jun 22, 2017 11:25    

Hello,

I have searched the forum for an answer to this.. and I seem to only be able to find very old stuff about it and it doesn't seem to relate to my version, which is the current stable version.

What I want to do is remove the login link currently top right hand of my site. I don't want it available or even visible to public. Basically, I don't want visitors to be able to register on my site. Just be able to view all contents.

Im so sorry if this is an old question that has been answered already. If thats the case, perhaps someone would kindly let me have the relevant link on the forum?

Im clearly not looking in the right place on my admin, but Ive only had this less than a week.

Thank you.
Waters

Jun 24, 2017 20:30

Hi @waters,

This answer has two sections:

1) Disable register: just go to Users > Settings > Registration & Login > Default user permissions and set the parameter New users can register to: No (Only admins can create new users). That's it, no more register links because registration is disabled in the whole site.

2) Remove login link at the top bar (site skin): this is a bit more tricky because that black bar is a skin shared by all the collections of your site, so you basically need to override the default site skin by going to the skins_site folder and creating a new folder inside of it named custom. Then, locate the file skins_site/_site_body_header.inc.php and duplicate it into skins_site/custom. Finally, locate the following block of code in the recently copied file skins_site/custom/_site_body_header.inc.php (around line 157):

			// Login link:
			// Call widget directly (without container):
			skin_widget( array_merge( $right_menu_params, array(
				// CODE for the widget:
				'widget' => 'menu_link',
				// Optional display params
				'link_type' => 'login',
				'link_default_class' => 'swhead_item_login '.$right_menu_params['link_default_class']
			) ) );

and remove all of it.

That would do the trick.

More info about overriding site skin can be found here: http://b2evolution.net/man/custom-site-skin

Regards!

This post has 1 feedback awaiting moderation...


Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.