i have to create an application whose logout url will be www.example.com/signout. But in drupal the logout url is www.example.com/logout. I want to show an page not available when an user types an url www.example.com/logout.

How can i do that please provide me solution . I have struck in this issue.

Comments

LiquidWeb’s picture

I definitely do not recommend that but if you want it
open modules/user/user.module and search for

$items['logout'] = array(
    'title' => 'Log out',
    'access callback' => 'user_is_logged_in',
    'page callback' => 'user_logout',
    'weight' => 10,
    'file' => 'user.pages.inc',
  );

then replace it with

$items['signout'] = array(
    'title' => 'Log out',
    'access callback' => 'user_is_logged_in',
    'page callback' => 'user_logout',
    'weight' => 10,
    'file' => 'user.pages.inc',
  );
pmajum1’s picture

I have my custom login module in my site in my module itself i have created a menu item for sign out . but ihave to block logout url in my custom module itself

LiquidWeb’s picture

I absolutely have no idea what do you mean it would be better if you show us url of your site

nicksanta’s picture

I think if you install the path module, and then go to admin/build/path/add you can create url alias's to any drupal system path, such as /logout, /node/add/page, /admin/build/views etc... Not quite sure why you would want the 404 error on /logout though...

----------------------
Nick Santamaria

eotinfotech’s picture

Hi,
I am also interested, in not using logout, even though we can have signout -> logout by path and url alias module.

Please explain the concept behind not using it.

Regards, and Have a nice day.

Prachait Saxena
---------------------------
(M) :- +91 9953 200 299
(W) :- http://eotinfotech.com/

mattyoung’s picture

function hook_menu_alter(&$items) {
  $items['signout'] = $items['logout'];
  unset($items['logout']);
}

Try this see if this works. But I'm not sure if it's a good idea to disable 'logout'. There might be thing that depend on path 'logout'.

creazion_dev’s picture

Create a new menu item with title signout and the following path:

logout?destination=your_destination_node

I've tested it only with active clean urls.