Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nijaz Hameed 38 posts 173 karma points
    Apr 22, 2019 @ 16:32
    Nijaz Hameed
    0

    how to access umbraco Back end logging success event?

    How to get Umbraco user login success event and render a popup after successful login?

  • Tarik 196 posts 840 karma points c-trib
    Apr 22, 2019 @ 21:39
    Tarik
    0

    Here are few links related to login user but for popup message I'm unsure which side you do your work is MVC view or via AngularJS page application?

    Login member programmatically on Umbraco 7

    Umbraco 7 User Login(backoffice) Programmatically 1

    Umbraco 7 User Login(backoffice) Programmatically 2

  • Nijaz Hameed 38 posts 173 karma points
    Apr 23, 2019 @ 12:09
    Nijaz Hameed
    0

    Thanks for the reply tarik, Actually I need to show a popup message after user login in to the umbraco backoffice, its doesnt matter mvc or angular, like umbraco back office tours.

    Would it be possible?

  • Tarik 196 posts 840 karma points c-trib
    May 08, 2019 @ 08:05
    Tarik
    100

    I was busy nijas, I suggest the following:

    Make debug as true to disable lazyload.

    <compilation defaultLanguage="c#" debug="true"
    

    In the path folder yourapp/Umbraco/Js/umbraco.directives.js insert the alert as in the code below:

    vm.loginStates.submitButton = 'busy';
    userService.authenticate(login, password).then(function (data) {
     // Demo for nijas
    alert('User logged in before redirect to backoffice');
    vm.loginStates.submitButton = 'success';
    userService._retryRequestQueue(true);
    if (vm.onLogin) {
    vm.onLogin();
    }
    

    In the path folder yourapp/Umbraco/Js/umbraco.controllers.js insert the alert as in the code below:

    dashboardResource.getDashboard($routeParams.section).then(function (tabs) {
    $scope.dashboard.tabs = tabs;
                // set first tab to active
                if ($scope.dashboard.tabs && $scope.dashboard.tabs.length > 0) {
                    $scope.dashboard.tabs[0].active = true;
                }
                $scope.page.loading = false;
    // Demo for nijas
    alert('User logged in after redirect to backoffice dashboard');    });
    

    Screenshots:

    enter image description here

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft