]> git.donarmstrong.com Git - roundcube.git/blob - program/steps/settings/delete_identity.inc
Imported Upstream version 0.2~stable
[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 2008 2008-10-24 08:30:52Z alec $
19
20 */
21
22 if (($ids = get_input_value('_iid', RCUBE_INPUT_GET)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $ids))
23 {
24   if ($USER->delete_identity($ids)) {
25     $OUTPUT->show_message('deletedsuccessfully', 'confirmation');
26   }
27   else {
28     $OUTPUT->show_message('nodeletelastidentity', 'error');
29   }
30   // send response
31   if ($OUTPUT->ajax_call)
32     $OUTPUT->send();
33 }
34
35 if ($OUTPUT->ajax_call)
36   exit;
37
38 // go to identities page
39 rcmail_overwrite_action('identities');
40
41 ?>