]> git.donarmstrong.com Git - roundcube.git/blob - program/steps/settings/delete_identity.inc
Imported Upstream version 0.1
[roundcube.git] / program / steps / settings / delete_identity.inc
1 <?php
2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/steps/settings/delete_identity.inc                            |
6  |                                                                       |
7  | This file is part of the RoundCube Webmail client                     |
8  | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
9  | Licensed under the GNU GPL                                            |
10  |                                                                       |
11  | PURPOSE:                                                              |
12  |   Delete the submitted identities (IIDs) from the database            |
13  |                                                                       |
14  +-----------------------------------------------------------------------+
15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16  +-----------------------------------------------------------------------+
17
18  $Id: delete_identity.inc 1035 2008-02-10 17:08:40Z till $
19
20 */
21
22 if (($ids = get_input_value('_iid', RCUBE_INPUT_GET)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $ids))
23 {
24
25   if ($USER->delete_identity($ids))
26   {
27     $OUTPUT->show_message('deletedsuccessfully', 'confirmation');
28   }
29   else 
30   {
31     $OUTPUT->show_message('nodeletelastidentity', 'error');
32   }
33   // send response
34   if ($OUTPUT->ajax_call)
35     $OUTPUT->send();
36 }
37
38
39 if ($OUTPUT->ajax_call)
40   exit;
41
42
43 // go to identities page
44 rcmail_overwrite_action('identities');
45
46 ?>