[owncloud-devel] How to connect to preRememberedLogin hook?

Arthur Schiwon blizzz at owncloud.com
Mon Feb 22 12:46:58 GMT 2016





 From:   Christian Ludwig <cl at viazenetti.de> 
 To:   "devel at owncloud.org" <devel at owncloud.org> 
 Sent:   10/14/2015 6:48 PM 
 Subject:   [owncloud-devel] How to connect to preRememberedLogin hook? 


 
 
Hi, 
  
I am writing an sso app that uses the “remember login” system. Now I need to do some things in the 'loginWithCookie' method (/lib/private/user/session.php) and  was happy to find a hook called  'preRememberedLogin' in line 246. But how can I connect to that hook? 
  
I tried 
  \OCP\Util::connectHook('\OC\User', 'preRememberedLogin', …, …); 
and 
  \OCP\Util::connectHook('\\OC\\User', 'preRememberedLogin', …, …); 
without success.
Try

$userSession = \OC::$server->getUserSession();
$userSession->listen('\OC\User', 'preRememberedLogin', ['\OCA\MyApp\className', 'methodName']);

Cheers
Arthur





 
  
Does anyone know what to add to my app.php? 
Thanks. 
  
Christian 

_______________________________________________ 
Devel mailing list 
Devel at owncloud.org 
http://mailman.owncloud.org/mailman/listinfo/devel 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160222/7b538cc0/attachment.html>


More information about the Devel mailing list