Changeset 2371 in subversion for branches/devel-api/index.php


Ignore:
Timestamp:
Apr 1, 2009 3:47:06 AM (4 years ago)
Author:
thomasb
Message:

Added new plugin hooks login_after, login_failed, message_read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-api/index.php

    r2287 r2371  
    109109    } 
    110110 
     111    // allow plugins to control the redirect url after login success 
     112    $redir = $RCMAIL->plugins->exec_hook('login_after', array('task' => $RCMAIL->task)); 
     113    unset($redir['abort']); 
     114 
    111115    // send redirect 
    112     $OUTPUT->redirect(); 
     116    $OUTPUT->redirect($redir); 
    113117  } 
    114118  else { 
    115119    $OUTPUT->show_message($IMAP->error_code < -1 ? 'imaperror' : 'loginfailed', 'warning'); 
     120    $RCMAIL->plugins->exec_hook('login_failed', array('code' => $IMAP->error_code, 'host' => $auth['host'], 'user' => $auth['user'])); 
    116121    $RCMAIL->kill_session(); 
    117122  } 
Note: See TracChangeset for help on using the changeset viewer.